From 61daffa4431f2f41eda689a5d15c08aa95d3b5a1 Mon Sep 17 00:00:00 2001 From: sahusridhar23 Date: Wed, 23 Jul 2025 14:06:47 +0530 Subject: [PATCH 1/2] docs: add emojis & improve README structure, formatting, grammar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reworded unclear sentences for better readability - Added emojis for visual clarity and user-friendliness - Improved markdown structure and formatting consistency - Fixed minor typos and capitalization issues (e.g., "minimax" → "Minimax") --- tictactoe/README.md | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/tictactoe/README.md b/tictactoe/README.md index b4c05b7..0e16961 100644 --- a/tictactoe/README.md +++ b/tictactoe/README.md @@ -2,9 +2,11 @@ This project implements a simple game of Tic-Tac-Toe using the Pygame library. You can play against an AI opponent that makes optimal moves using the minimax algorithm. +## 📸 Screenshot + ![Tic-Tac-Toe Screenshot](screenshot.png) -## Table of Contents +## 📑 Table of Contents - [Prerequisites](#prerequisites) - [Installation](#installation) @@ -12,30 +14,37 @@ This project implements a simple game of Tic-Tac-Toe using the Pygame library. Y - [AI Opponent](#ai-opponent) -## Prerequisites +## ✅ Prerequisites To run this project, you'll need the following: - Python 3.x - Pygame library (already included in the project) -## Installation +## 💾 Installation 1. Clone the repository to your local machine: ```bash git clone https://github.com/your-username/tic-tac-toe-pygame.git -## How to Play - - use runner.py to open game - - When you run the game, you'll be presented with a menu to choose your player: "X" or "O". Click on the respective buttons to select. - - The game board will appear, and you can take turns to make your moves by clicking on an empty cell. - - The AI opponent (if you didn't choose it as your player) will also make moves using the minimax algorithm. - - The game will continue until there is a winner or a tie. The result will be displayed at the top of the game window. - - You can play again by clicking the "Play Again" button after the game ends. -## AI Opponent - - The AI opponent uses the minimax algorithm to make optimal moves. It considers all possible moves and selects the best one to maximize its chances of winning or minimizing the chances of losing. You can try to beat the AI in this classic game! +## 🎮 How to Play + + 1. use runner.py to open game + 2. When the game starts, you'll see a menu to choose your player: X or O. Click the respective button to select + 3. The game board will appear. Click on an empty cell to make your move. + 4. The AI opponent (if you didn't select it as your player) will make moves using the Minimax algorithm. + 5. The game will continue until there is a winner or a tie. The result will be displayed at the top of the game window. + 6. Click the Play Again button to restart the game. + +## 🤖 AI Opponent + The AI uses the Minimax algorithm to make optimal moves. It evaluates all possible game states to choose the best move, aiming to: + +* Maximize its chances of winning + +* Minimize the chances of losing +Try to beat the AI in this classic game of strategy! From ce80183dbca0baaea40a15c7820d3a5ef58cc4fd Mon Sep 17 00:00:00 2001 From: sahusridhar23 Date: Wed, 23 Jul 2025 14:09:45 +0530 Subject: [PATCH 2/2] docs : changed heading name from "Screenshot" to "Preview" in Readme.md --- tictactoe/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tictactoe/README.md b/tictactoe/README.md index 0e16961..555b817 100644 --- a/tictactoe/README.md +++ b/tictactoe/README.md @@ -2,7 +2,7 @@ This project implements a simple game of Tic-Tac-Toe using the Pygame library. You can play against an AI opponent that makes optimal moves using the minimax algorithm. -## 📸 Screenshot +## 📸 Preview ![Tic-Tac-Toe Screenshot](screenshot.png)