X | |
---+---+---
| O |
---+---+---
| X | O
is the string "X O XO".
Given a board string, the function tic() returns the next board. However, if the opponent can win (provided he makes the right moves), then tic() doesn't try to fight back, and may return bad moves. A smarter program might continue to fight back as long as the game is not actually over.
Inga kommentarer:
Skicka en kommentar