Welcome to the TicTacToe project! This is a fun, classic game built with modern web technologies. It's a simple but engaging project that showcases the use of React, TypeScript, Tailwind CSS, and testing tools like Jest and Cypress.
-
Multiplayer Game: Play against your friends and take turns as X and O! โ๏ธ
๐ พ๏ธ -
Responsive Design: Works perfectly across all devices โ desktop, tablet, or mobile ๐ฑ๐ป.
-
Lightweight Styling: Designed using Tailwind CSS for a clean, modern UI ๐จ.
-
Accessibility First: Enhanced accessibility for a better experience for all players โฟ๏ธ.
-
Tested for Quality: Thoroughly tested with Jest and Cypress for reliability โ .
-
Frontend: React + TypeScript โ๏ธ๐
-
Styling: Tailwind CSS ๐
-
Testing: Jest for unit testing, Cypress for end-to-end testing ๐งช
Follow these steps to get the game up and running on your local machine:
- Node.js and npm installed on your machine.
-
Clone the repository:
git clone https://github.com/Mupa1/tictactoe.git
-
Navigate to the project directory:
cd tictactoe
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open http://localhost:3000 to view it in the browser.
To run unit tests with Jest:
npm test
To run end-to-end tests with Cypress:
npm run e2e
Or to run in headless mode:
npm run e2e:run
To generate a coverage report:
npm run coverage
##๐ Project Structure
-
src/components: Contains reusable UI components (e.g., Board, Square)
-
src/tests: Contains unit tests for the components
-
cypress/e2e: Contains end-to-end tests
-
Game Logic: Implemented logic for handling turns, win/draw states, and resetting the game ๐.
-
Accessibility: Includes ARIA labels for screen reader support to enhance the game experience for everyone ๐.
-
๐ค AI Player: Add a single-player mode with an AI opponent.
-
๐จ Themes: Add light/dark mode support for different visual preferences.
-
๐ Score Tracking: Keep track of wins and draws.
Check out the live demo here: TicTacToe Demo ๐.
Contributions are welcome! If you'd like to make any improvements or add features:
-
Fork the repository ๐ด.
-
Create a new branch (git checkout -b feature-branch) ๐ฟ.
-
Commit your changes (git commit -m 'Add new feature') ๐ฌ.
-
Push the branch (git push origin feature-branch) ๐ค.
-
Open a pull request ๐.
This project is licensed under the MIT License. ๐
- Inspired by the classic TicTacToe game we all know and love โค๏ธ.
Feel free to reach out if you have any questions or suggestions! โจ
Enjoy the game and happy coding! ๐๐พ