Write an API to determine if somebody has won/lost or drawn in tic-tac-toe game.
0 0 0
0 0 0
0 1 0
0 2 0
0 0 0
0 1 0
0 2 1
0 0 0
0 1 0
0 2 1
0 0 2
0 1 0
1 2 1
0 0 2
0 1 0
1 2 1
0 2 2
0 1 0
1 2 1
1 2 2
0 1 0
1 2 1
1 2 2
0 1 2
Game DRAW!
0 0 0
1 0 0
0 0 0
0 2 0
1 0 0
0 0 0
0 2 0
1 1 0
0 0 0
0 2 2
1 1 0
0 0 0
0 2 2
1 1 0
0 1 0
0 2 2
1 1 0
0 1 2
0 2 2
1 1 1
0 1 2
1 WINS!
No comments:
Post a Comment