Skip to content

danialeyz/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe game

Hello guys !❤️😃 This project is a Tic Tac Toe game implemented in Javascript.

Features

  • Two-player mode: Players can take turns and make their moves on the game board.
  • Interactive interface: The game provides a user-friendly interface for players to input their moves.
  • Win detection: The game automatically detects when a player has won or if the game ends in a draw.

How to Play

  1. Launch the game by running the program.
  2. The game board will be displayed on the command line interface.
  3. Players will take turns entering their moves by specifying the row and column of their desired position on the board.
  4. The game will continue until a player wins or the game ends in a draw.
  5. After the game ends, players can choose to play again or exit the program.

Example Usage

$ ./tic-tac-toe Welcome to Tic Tac Toe!

Player 1: X Player 2: O

1 | 2 | 3

4 | 5 | 6

7 | 8 | 9

Player 1's turn. Enter your move: 5

1 | 2 | 3

4 | X | 6

7 | 8 | 9

Player 2's turn. Enter your move: 2

1 | O | 3

4 | X | 6

7 | 8 | 9

...

Player 1 wins!

Do you want to play again? (Y/N): N Thank you for playing Tic Tac Toe!

Contact

For any questions or inquiries, please contact Danialeyvaziiii@gmail.com.

master

About

This project is a Tic Tac Toe game implemented in Javascript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published