Added a minimax search in the endgame stage (both hands are known)