A simple command-line Tic Tac Toe game implemented in Rust. This project demonstrates the basics of Rust programming, including handling user input, managing game states, and implementing a classic game in a straightforward and interactive way.
- Interactive Gameplay: Play Tic Tac Toe directly in the terminal.
- Two-Player Mode: Play with a friend in turn-based fashion.
- Game State Management: The program checks for winning conditions and handles draws effectively.
- Error Handling: Handles invalid moves, preventing overwriting of cells.
- Rust (ensure it's installed by running
rustc --version
)
-
Clone the repository:
git clone https://github.com/agastya3636/tic_tac_toe_in_rust.git cd tic_tac_toe_in_rust
-
Run the game:
cargo run
- Players take turns entering the position (row and column) where they want to place their mark (X or O).
- The game checks for a winner or a draw after each move and displays the board.
- src/main.rs: The main game logic and functions for displaying the board, handling turns, and checking win conditions.
- Add AI for single-player mode.
- Create a graphical version using a Rust GUI library.
- Implement a scoring system.