|
| 1 | +# Tic-Tac-Toe Game (2 Players) |
| 2 | + |
| 3 | +## Table of Contents |
| 4 | +- [Introduction](#introduction) |
| 5 | +- [Game Rules](#game-rules) |
| 6 | +- [Getting Started](#getting-started) |
| 7 | +- [How to Play](#how-to-play) |
| 8 | +- [Winning](#winning) |
| 9 | +- [Draw](#draw) |
| 10 | +- [Contributing](#contributing) |
| 11 | +- [License](#license) |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## Introduction |
| 16 | +Welcome to the 2-player Tic-Tac-Toe game! This classic game is designed for two players to compete against each other in a simple yet engaging way. It's a perfect choice for those who enjoy strategic thinking and friendly competition. |
| 17 | + |
| 18 | +## Game Rules |
| 19 | +Tic-Tac-Toe is played on a 3x3 grid. Two players take turns marking empty cells with their respective symbols: |
| 20 | +- Player 1: O |
| 21 | +- Player 2: X |
| 22 | + |
| 23 | +The goal of the game is to form a straight line (horizontal, vertical, or diagonal) of your symbol (X or O) before your opponent does. The player who achieves this first wins the game. |
| 24 | + |
| 25 | +## Getting Started |
| 26 | +To play the game, follow these steps: |
| 27 | + |
| 28 | +1. Clone this repository to your local machine or download the source code. |
| 29 | +2. Open a terminal or command prompt and navigate to the game's directory. |
| 30 | + |
| 31 | +## How to Play |
| 32 | +1. Run the game by executing the main script. For example, if you are using Python, you can run the game with the following command: |
| 33 | + ``` |
| 34 | + python tictactoe.py |
| 35 | + ``` |
| 36 | +2. The game will display an empty 3x3 grid. |
| 37 | +3. Players will take turns entering the row and column where they want to place their symbol (X or O). |
| 38 | +4. The game will update the grid and display it after each move. |
| 39 | +5. Continue taking turns until one player wins or the game ends in a draw. |
| 40 | + |
| 41 | +## Winning |
| 42 | +A player wins by achieving one of the following conditions: |
| 43 | +- Completing a row (horizontally). |
| 44 | +- Completing a column (vertically). |
| 45 | +- Completing a diagonal line (either from the top-left to bottom-right or from top-right to bottom-left). |
| 46 | + |
| 47 | +The game will announce the winner and ask if you want to play again. |
| 48 | + |
| 49 | +## Draw |
| 50 | +If all cells on the grid are filled, and no player has achieved a winning condition, the game ends in a draw. It will inform you that the game is a draw and ask if you want to play again. |
| 51 | + |
| 52 | +## Contributing |
| 53 | +If you'd like to contribute to this Tic-Tac-Toe game, please feel free to submit pull requests or open issues on the GitHub repository. We welcome any improvements, bug fixes, or feature enhancements. |
| 54 | + |
| 55 | +## License |
| 56 | +This Tic-Tac-Toe game is open-source software released under the [MIT License](LICENSE). You are free to use, modify, and distribute this software as per the terms of the license. |
| 57 | + |
| 58 | +Enjoy playing the game and have fun competing with your friends! |
0 commit comments