Skip to content

skyamit/TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToe - Two Player Game

This Project is a implementation of Object Oriented Programming Language, where two friends can play TicTacToe game.

Download

$ git clone https://github.com/skyamit/TicTacToe

How to Play:

1. The game will ask for player 1's name
2. The game will ask for player 1's sign
3. The game will ask for player 2's name
4. The game will ask for player 2's sign
5. Now just keep on providing x and y coordinates of the board, where you want to mark your sign.
6. Once someone wins or the game results in a draw, the game will end.
7. Play again, maybe? Who will be the winner this time?

Game Example:

Enter player 1 name:  
plr1Name
Enter player 1 move sign:  
x
Enter player 2 name: 
plr2Name
Enter player 2 move sign:
0
Enter the size of the board:
3

The game has started!

Enter x coordinate, plr1Name:
0
Enter y coordinate, plr1Name:
0

-----------
 x  -  -
 -  -  -
 -  -  -
-----------
Enter x coordinate, plr2Name:
0
Enter y coordinate, plr2Name:
1

-----------
 x  0  -
 -  -  -
 -  -  -
-----------
Enter x coordinate, plr1Name:
1
Enter y coordinate, plr1Name:
1

-----------
 x  0  -
 -  x  -
 -  -  -
-----------
Enter x coordinate, plr2Name:
2 
Enter y coordinate, plr2Name:
0

-----------
 x  0  -
 -  x  -
 0  -  -
-----------
Enter x coordinate, plr1Name:
2
Enter y coordinate, plr1Name:
2

-----------
 x  0  -
 -  x  -
 0  -  x
-----------
plr1Name won the game, well played!

Have fun playing terminal TicTacToe with your friends!

Authors

Contributing

Contributions are always welcome! We look forward to collaboration.

Releases

No releases published

Packages

No packages published

Languages