tictactoe minimax implemented