test "Finished game where X won via a row and a column victory" do
board = """
XXX
XOO
XOO
"""
assert StateOfTicTacToe.game_state(board) == {:ok, :win}
end
For the above test, the result should have been similar to an error state as described by the last test because a row and column victory isn’t possible at the same time in a turn
test "Invalid board: X won and O kept playing" do
board = """
XXX
OOO
...
"""
assert StateOfTicTacToe.game_state(board) ==
{:error, "Impossible board: game should have ended after the game was won"}
end