A simple TicTacToe game built using React.
This project is a basic implementation of the TicTacToe game. It allows two players to take turns marking the spaces in a 3x3 grid with 'X' or 'O'. The game will declare a winner when one player has three marks in a horizontal, vertical, or diagonal row. If no player achieves this and the grid is filled, the game ends in a draw.
- Interactive Board: Click on squares to place 'X' or 'O'.
- Status Display: Displays the current player's turn and game result (winner or draw).
- Reset Functionality: Reset the game board to start a new game.
- React: Used for building the UI components and managing state.
- CSS: Styling of the game board and components.
- Node.js
- npm (Node package manager)
-
Clone the repository:
git clone https:/yourusername/tictactoe.git
-
Navigate to the project directory:
cd tictactoe
-
Install the dependencies:
npm install
To start the development server, run:
npm start
Open http://localhost:3000 in your browser to view the game.
- Click on an empty square to place 'X' or 'O'.
- The game will display the current player's turn and the game's status (winner or draw).
- To start a new game, click the reset button or refresh the page.
Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or suggestions.