Skip to content

SandroJijavadze/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

2 player, command-line, auto-play from .txt file.

2 player version:
Input format for moves: "A1" - first row, first column, "A2" - first row, second column.
Letters are rows (A => 0, B => 1, C=> 2), digits are columns.

game.txt
This is for professor to test the tic-tac-toe code using custom input moves for player 1 and 2.
For it to work, place game.txt in the directory with .cs files.

While there is no game.txt, the program will ask user if he wants to try playing again.

It will ask again, if player wants 2 player mode or .txt file.

Format of input moves:

P1: B1
P2: B2
P1: C2
P2: A1
P1: C1
0000000000

NOTE: "0000000000" this denotes end of the game.

In case of playing in game.txt mode, the games are output in json array representation as such:
[[1,0,2],[1,1,2],[2,0,1]]
[[0,0,0],[0,0,0],[2,1,2]]

Each line is the last state of board before winning or ending using "0000000000"

About

2 player, command-line

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages