Added method to calculate best move for D2