A simple, interactive web-based implementation of the classic Noughts and Crosses (Tic-Tac-Toe) game.
This project is a web-based Noughts and Crosses game that allows two players to compete against each other. The game features a clean, user-friendly interface with a 3x3 grid, player turn indicator, and score tracking.
Visit baberlabs.github.io/noughts-and-crosses for a live demo.
- Interactive 3x3 game board
- Turn-based gameplay for two players
- Player score tracking
- Game state management (win, draw, ongoing)
- Reset functionality to start a new game
- HTML5
- CSS3
- JavaScript (ES6+)
- Clone the repository:
git clone https://github.com/baberlabs/noughts-and-crosses.git
- Navigate to the project directory:
cd noughts-and-crosses
- Open
index.html
in your preferred web browser.
- The game starts with Player 1 (X).
- Players take turns clicking on an empty cell to place their mark (X or O).
- The first player to get three of their marks in a row (horizontally, vertically, or diagonally) wins the game.
- If all cells are filled and no player has won, the game is a draw.
- Use the "Reset Board" button to start a new game at any time.
This project was pair programmed by:
Contributions, issues, and feature requests are welcome. Feel free to check issues page if you want to contribute.