first attempt to solve the game with minimax