Welcome to the Tic-Tac-Toe game project! This project is a front-end web application built with React, XState, and Styled Components. Users can select the board size and choose between different game modes.
This project is a simple implementation of Tic-Tac-Toe with the following features:
- After Starting Game users can select the board size (3x3 or 4x4).
- Options to play against an AI or with another player.
- A game board that updates with each move.
- Detection of the game outcome (win, draw, or ongoing).
- A reset button to start a new game.
- Board Size Selection: Choose between a 3x3 or 4x4 board.
- Game Modes: Play against another player or an AI.
- State Management: Uses XState for managing game states and transitions.
- Styling: Styled Components for a clean and responsive UI.
- Unit Testing: Comprehensive tests for game functionality and state management.
- React: For building the user interface with functional components and hooks.
- XState: For state management with finite state machines.
- Styled Components: For modular and reusable styling.
- Jest and React Testing Library: For unit testing.
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Suleymanmalikov/tic-tac-toe.git
-
Navigate into the project directory:
cd tic-tac-toe
-
Install the dependencies:
npm install
To run the project locally, use the following command:
npm start
This will start the development server and open the game in your default web browser.
To run the unit tests for the project, use:
npm test
This will execute the tests defined in the __tests__
directory and provide feedback on the functionality and state management.
You can view and interact with the project here