calculation of minimum moves to win the game