Tic-Tac-Toe View Live
This project is a simple implementation of the classic Tic-Tac-Toe game built with React. It allows two players to play against each other in a traditional 3x3 grid.
To run this project locally, follow these steps:
Make sure you have Node.js and npm (Node Package Manager) installed on your machine.
- Clone the repository:
git clone https://github.com/pritamkumarshahi/tic-tac-toe.git
- Navigate to the project directory:
cd tic-tac-toe
- Install, Run, Build:
npm install
npm start
npm run build
- The game is played by two players: Player 1 is "X" and Player 2 is "O".
- Players take turns to click on the squares of the grid to place their symbol ("X" or "O").
- The first player to get three of their marks in a horizontal, vertical, or diagonal row wins the game.
- After the game ends, the winning squares are highlighted, and the game board fades out.
- A "Reset Game" button allows you to start a new game.
- Classic 3x3 Tic-Tac-Toe gameplay.
- Visual feedback with highlighted winning combination.
- A smooth fade-out effect for the game board after the game ends.
- Reset button to play again.
- Responsive design for different screen sizes.
tic-tac-toe/
: Root directory of the project.public/
: Directory for public files, containing:index.html
: Entry point for the app.
src/
: Source files for the project:components/
: Contains React components.GameInfo.js
: Component for displaying game info (player turn, winner).Square.js
: Component for individual game squares.TicTac.js
: Main game component.
styles/
: Directory for stylesheets.TicTac.css
: CSS file for the Tic-Tac-Toe game styles.
App.js
: Main app component.index.js
: JavaScript entry point for React.
package.json
: File that lists project dependencies and scripts.README.md
: Project documentation file.
- Add a scoring system to keep track of wins.
- Implement an AI opponent for single-player mode.
- Add a timer or turn-based limit for each move.
npm run build
This will create an optimized production build of the game, which you can then deploy to platforms like GitHub Pages, Netlify, or Vercel.
Uploading tic-tac.mov…