TicTacToe sample copied from book