Skip to content

janpabisiak/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe GitHub license

A simple tic-tac-toe game implemented in JavaScript.

How to Play?

  1. Open the index.html file in a web browser.
  2. Upon launching the game, the main menu will appear, allowing you to choose a game mode.
  3. There are two game modes available:
    • PvP (Player vs. Player): Select this mode if you want to play against another player. Click on the "Player vs. Player" button in the main menu to start a game in this mode.
    • PvC (Player vs. Computer): Select this mode if you want to play against the computer. Click on the "Player vs. Computer" button in the main menu to start a game in this mode.
  4. Once you have chosen a game mode, the game will start, and the game board will be displayed on the screen.
  5. To place your mark (X or O), click on the corresponding tile on the game board.
  6. The game ends when one player achieves a win (three marks in a horizontal, vertical, or diagonal line) or a tie (all tiles are filled, but there is no winner).
  7. After the game ends, you can start a new game by clicking the "New Game" button.

Code Structure

  • index.html: HTML file that contains the game structure and basic page layout.
  • style.css: CSS file that defines the game's appearance.
  • script.js: JavaScript file that contains the game logic.

Author & License

The project was created by Jan Pabisiak and it is using the MIT License.