This is a simple Flutter Tic-Tac-Toe game project that allows two players to take turns marking the spaces in a 3x3 grid. The game includes a timer ⏲️ and keeps track of scores for Player X and Player O.
- Two-player mode (Player X and Player O).
- Timer with a 30-second countdown for each turn.
- Score tracking for Player X and Player O.
- A result declaration when a player wins or the game ends in a draw.
Follow these steps to get the Tic-Tac-Toe game up and running on your local machine.
- Make sure you have Flutter installed on your system.
- Clone the repository to your local machine:
- Navigate to the project directory:
cd flutter-tic-tac-toe
- Run the Flutter app:
flutter run
The Tic-Tac-Toe game should now be running on your device or emulator.
- Player X starts the game.
- Players take turns tapping on the empty cells to place their mark (
X
orO
). - The game continues until one player wins by getting three of their marks in a row horizontally, vertically, or diagonally, or until all cells are filled and the game ends in a draw.
- The timer counts down from 30 seconds for each turn. If a player does not make a move within the time limit, the game moves to the next player's turn automatically.
This project was inspired by the classic game of Tic-Tac-Toe.
All files have been elegantly penned down in the flutter_lints style.