1. Computing a square-root is unnecessary; further, it only works when `kBoardSize` is a perfect square. Prefer const int kBoardLength = 3; const int kBoardSize = kBoardLength * kBoardLength; 2. Your test for unreachability is not complete. You verify that O has made no more moves than X, but you really need to check that the winner made the last move. If X won, then should have `numberOfX = numberOfO + 1`; if O won then should have `numberOfO = numberOfX`. It should be clear how to add these checks to your `CheckTicTacToeBoard` method. 3. A more overarching tension in this code is: should the board size really be a constant? The code is written so abstractly as to support any board size. But then the board size is fixed to a constant. I would choose one of the following directions to proceed in: * Commit to a board size of 9. In this case, I would recommend hard-coding the win conditions in `winDetection`. There are only 8 ways to win, so the resulting code would be a lot cleaner. * Allow arbitrary board sizes. In this case, you should accept a `boardLength` argument. Further, you will have to refine the notion of an `UnreachableState`. For example, in 4-by-4 tic tac toe, the following state is unreachable, but not detected by your code: x x x x o o o o x x x x o o o o