Nathan-Somto / tic-tac-toe

A simple tic tac toe game written in vanilla js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tic Tac Toe Game

A tic tac toe game created with Html, Css and Javascript no Frameworks

Features

  • Two-player mode: Play against a friend on the same device.
  • Player vs CPU mode: Play against the Computer (which is not very smart yet).
  • Interactive UI: Click on cells to make moves and see the game board update in real-time(Cause why not).
  • Win and tie detection: The game automatically detects winning moves and ties(bare minimium tho 😢).
  • Score tracking: Keeps track of the number of wins for each player and ties(Just dont refresh).
  • Responsive design: The game adapts to different screen sizes and devices.
  • Functional Programmed: Because OOp is for the 1970s

Demo

You can see a live demo of the Tic Tac Toe game here.

Usage

  1. Clone the repository:
$ git clone https:// https://github.com/nathan-somto/tic-tac-toe.git
  1. Open the index.html file in a web browser.

  2. Select the game mode (Two-player or Player vs CPU) from the game selection screen.

  3. Play the game by taking turns clicking on the cells. The current player's mark (X or O) will be displayed on the cells.

  4. The game automatically detects winning moves and ends the game. The result will be shown in a modal, and the scores will be updated accordingly.

  5. To restart the game, click the "Next Round" button in the result modal.

Screenshots

No screenshots for this one just play the game

Contributors

About

A simple tic tac toe game written in vanilla js.


Languages

Language:JavaScript 50.4%Language:CSS 25.7%Language:HTML 23.9%