Coding Dojo

Edit on Gitlab

Tic Tac Toe

About this kata

Like many game kata, it’s a good introduction to double loop TDD or BDD.

Rules

The rules of the tic tac toe game are the following:

Suggested Test Cases

Given this game board

+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 4 | 5 | 6 |
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+

And it's the turn of player X
When it play on cell 5
Then the board is now 

+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 4 | X | 6 |
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+

And it's not the end of game.

Links