A simple Tic-Tac-Toe game built using React and styled with TailwindCSS. This project allows users to play in two modes: Single Player (where the player always plays as 'X') and Two Player (local multiplayer).
- Single Player Mode: The player always plays as 'X', while the 'O' moves are handled by basic game logic (the computer automatically takes turns as 'O').
- Two Player Mode: Two players can take turns playing on the same device.
- Responsive design using TailwindCSS for smooth gameplay on various devices.
- A simple, intuitive interface with a minimalistic design
Check out the live demo here
Follow these steps to run the project on your local machine:
-
Clone this repository:
git clone https://github.com/rizalfahlevi8/game-TicTacToe.git
-
Navigate into the project directory:
cd game-TicTacToe
-
Install the dependencies:
npm install
-
Start the development server:
npm run dev
-
Open the app in your browser with the address that appears in terminal
Once the app is running, you can choose between two modes:
- Single Player Mode: The player always plays as 'X', and the 'O' moves are controlled by basic game logic.
- Two Player Mode: Two players take turns playing on the same device. Player 1 plays as 'X', and Player 2 plays as 'O'.
Players take turns selecting squares on the board to place their symbol. The game ends when one player gets three of their symbols in a row (horizontally, vertically, or diagonally), or if all the squares are filled and there is no winner, the game ends in a draw.
- React: A JavaScript library for building dynamic user interfaces.
- TailwindCSS: A utility-first CSS framework for rapid styling and responsiveness.
- Vite: A fast frontend build tool for modern web development.
Contributions are welcome! Feel free to open an issue or submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
If you have questions or problems, don't hesitate to contact us via the social media listed on our profile page.