Tic-tac-toe, Computer vs. human

exercise No. 160


This exercise is beyond the current lecture's scope with respect to complexity. Feel free to solve it at your own discretion in case of hunting for challenges. Your implementation will allow humans playing tic-tac-toe against a computer:

Figure 455. Two Tic-tac-toe players fighting each other.

The underlying logic is considerately more difficult to implement and requires recursion as being introduced in the section called “Factorial, the recursive way”. You may want to read: