A simple, interactive Tic-Tac-Toe game built with React and Next.js.
- Play Tic-Tac-Toe against another player
- Time travel: Go back to previous moves
- Sort moves in ascending or descending order
- Responsive design
- React
- Next.js
- TypeScript
- CSS Modules
- Node.js (v14 or later)
- npm or yarn
-
Clone the repository:
git clone https://github.com/ahmednasser111/tic-tac-toe-game.git -
Navigate to the project directory:
cd tic-tac-toe-game -
Install dependencies:
npm installor
yarn install -
Run the development server:
npm run devor
yarn dev -
Open http://localhost:3000 in your browser to play the game.
- The game starts with Player X. Click on any square to make a move.
- Players take turns to place their symbol (X or O) on the board.
- The first player to get three of their symbols in a row (horizontally, vertically, or diagonally) wins.
- If all squares are filled and no player has won, the game is a draw.
- Time Travel: Use the buttons below the board to go back to any previous move.
- Sort Moves: Click the "Sort Ascending/Descending" button to change the order of the move list.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.