https://github.com/mohamed-sayedalahl/tictactoe
A TicTacToe (XO) Game with many features and capable computer opponent that will block nearly every move you make!!
https://github.com/mohamed-sayedalahl/tictactoe
csharp dotnet exe framework game gamedev tictactoe
Last synced: 2 months ago
JSON representation
A TicTacToe (XO) Game with many features and capable computer opponent that will block nearly every move you make!!
- Host: GitHub
- URL: https://github.com/mohamed-sayedalahl/tictactoe
- Owner: Mohamed-SayedAlAhl
- License: other
- Created: 2024-08-16T14:11:21.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-17T16:59:32.000Z (almost 2 years ago)
- Last Synced: 2025-05-17T05:11:21.669Z (about 1 year ago)
- Topics: csharp, dotnet, exe, framework, game, gamedev, tictactoe
- Language: C#
- Homepage: https://github.com/Mohamed-SayedAlAhl/TicTacToe
- Size: 172 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tic-Tac-Toe Game
This is a simple Tic-Tac-Toe (XO) game developed using C# and Windows Forms. The game allows a player to compete against the computer, with the computer's moves being determined by a basic AI strategy.
## Features
- **Single Player Mode**: Play against the computer.
- **Cheating Mode**: Enable or disable a "Cheating Mode" where the computer has an advantage.
- **Score Tracking**: The game keeps track of how many times the player and the computer have won.
- **Reset Functionality**: Reset the game to start a new round.
- **User-Friendly Interface**: Intuitive and simple design for ease of play.
## Game Logic
The game board consists of a 3x3 grid of picture boxes that can be clicked by the player to make a move. The game automatically switches between the player and the computer, checking for a winner after each move.
### Player Moves
- The player starts the game and plays with the "X" symbol.
- The computer plays with the "O" symbol.
- The player can click on any empty box to make a move.
### Computer Moves
- The computer's move is determined by predefined win conditions, which it tries to satisfy to either win or block the player from winning.
- If no winning move is available, the computer will make a random move.
### Winning Conditions
The game checks for the following winning conditions after each move:
- Three symbols in a row (horizontal, vertical, or diagonal).
- If all boxes are filled without a winner, the game ends in a draw.
### Cheating Mode
The "Cheating Mode" gives the computer an advantage by allowing it to make two moves in one turn. This mode can be toggled on or off using a button in the UI.
## Getting Started
### Prerequisites
- Windows operating system.
- .NET Framework 4.7.2 or higher.
### Installation
1. Download The latest exe version from the release section and enjoy!!
## Usage
- Start the application to begin the game.
- Click on any empty box to make your move.
- The game will alternate between your move and the computer's move.
- Use the "Reset" button to start a new game.
- Toggle the "Cheating Mode" to enable or disable the computer's advantage.
## License
Please refer to the [LICENSE](https://github.com/Mohamed-SayedAlAhl/TicTacToe/blob/main/LICENSE) file for detailed licensing terms.
## Contact
For any questions or permission requests, please contact:
- [Mohamed Sayed Al-Ahl](https://www.linkedin.com/in/mohamed-sayedalahl/)