A simple web-based Tic-Tac-Toe game built with HTML, CSS and vanilla JavaScript. The goal of this project is to provide a clean implementation of the classic XO game that you can play directly in your browser.
- Player vs Player – Two players take turns placing their symbols (X or O) on a 3 × 3 grid.
- Victory detection – The game automatically checks for a win or draw after each move.
- Scoreboard – Keeps track of wins and draws across multiple rounds.
- Responsive design – The layout adjusts to fit different screen sizes.
To play the game locally:
- Clone the repository using
git clone https://github.com/ALxxy123/xo.git. - Change into the project directory with
cd xo. - Open
index.htmlin your browser (double‑click the file or serve it via a simple HTTP server).
Alternatively, you can preview the game online using GitHub Pages or by hosting the index.html file on any static site hosting service.
- Open the game in your browser.
- Click on an empty cell to place your mark (X or O). Players alternate turns.
- The first player to align three of their marks horizontally, vertically or diagonally wins. If all cells are filled without a winning line, the game is a draw.
- Click the Reset button to start a new round while keeping the current score.
Contributions are welcome! If you have ideas for new features or improvements, feel free to open an issue or submit a pull request. Please follow semantic commit messages and ensure your changes are well‑documented.
This project is open‑source and available under the MIT License.
This project is open‑source and available under the MIT License.