Play against the computer (Tic-Tac-Toe)
Put it together: the input is your moves as X, <row <col per line. After each valid move print X - <row <col, then, if the game is not over, the computer (O, using minimax from stage 4) answers with O - <row <col. Invalid moves print the stage 2 errors (not your turn cannot happen now). At the end print the board and status.
Input: One move per line.
Output: Moves, then the board and status.
Difficulty: Hard. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Reuse your minimax function for O.