reset password
Author Message
rabbott
Posts: 1649
Posted 08:46 Oct 27, 2016 |

I thought the name of the winner function did not do a good job of indicating its intent. So I changed it to gameOver -- and moved it to its alphabetical place in the file. It still returns Maybe Char. It's job is to look at the current state of the game and to determine whether the game is over. A game is over if either (a) some player currently has 3 in a row or (b) the board is full. If the game is over it returns Just <result> where result is one of X, O, or -. If the game is not over, it returns Nothing.

Last edited by rabbott at 08:47 Oct 27, 2016.