tictactoe board logic