Skip to content

IbroRebronja/TicTacToe-JavaScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToe Game

This is a simple implementation of the classic TicTacToe game using HTML, CSS, and JavaScript. It provides a user-friendly interface for playing TicTacToe against another player locally in a web browser.

Features

  • Responsive Design: The game interface is designed to adapt to various screen sizes, making it playable on both desktop and mobile devices.
  • Two Player Mode: Play against a friend locally. Take turns placing your marks (X or O) on the grid until someone wins or the game ends in a draw.
  • Win Detection: The game automatically detects when a player wins by achieving three marks in a row (horizontally, vertically, or diagonally) and displays the winner.
  • Draw Detection: If all cells on the grid are filled and there is no winner, the game ends in a draw.
  • Restart Option: After a game ends (either with a win or draw), players have the option to restart and play again without refreshing the page.

Usage

  • Start playing TicTacToe by clicking on the cells to place your marks (X or O).

Contributing

Contributions are welcome! If you have any ideas for improvements or find any issues, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.