added method to determine cpu's best move