Application Kata „Tic Tac Toe“
Implement a console application fort wo players playing [Tic Tac Toe].
By running the program a new game is started. It is displayed like the following:
A B C
0 | |
-+-+-
1 | |
-+-+-
2 | |
Command:
If a player tries to place the token on a field that is filled already the game board is displayed again without any changes and the player can try again.
The game board is displayed after each move. If player 1 moves to A0 and player 2 moves to B1 the game board looks like the following:
A B C
0X| |
-+-+-
1 |O|
-+-+-
2 | |
Command:
By entering „exit“ one can quit the program.
The game is over if no more moves are possible or one player won the game. A message will be displayed like the following:
A B C
0X| |
-+-+-
1X|O|O
-+-+-
2X| |
*** Player 1 wins
Command:
Resources
[Tic Tac Toe] https://en.wikipedia.org/wiki/Tic-tac-toe
Endnotes
[1]The commands should be understood without considering upper or lower case.
“Ich bin der Gründer von Majer Consulting. In der Welt der SAP bin ich seit 1998 unterwegs, habe in dieser Zeit zahlreiche Projekte als Entwickler, Architekt oder Coach unterstützt und eine große Leidenschaft für Software-Engineering, Software-Test und agilen Entwicklungsmethoden wie TDD entwickelt. Wenn ich nicht im Kundeneinsatz bin oder Seminare halte, spreche ich auf Konferenzen oder schreibe an meinem nächsten Buch.”