From c03815ae0ede2a2fb1f2c3d3a0869bceaad7d637 Mon Sep 17 00:00:00 2001 From: Mark Bluemer Date: Sat, 29 Apr 2017 15:35:33 -0400 Subject: [PATCH] simplify variable depth function --- src/MinimaxSearch.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/MinimaxSearch.cpp b/src/MinimaxSearch.cpp index 2cd45a3..8e066d1 100644 --- a/src/MinimaxSearch.cpp +++ b/src/MinimaxSearch.cpp @@ -65,10 +65,7 @@ bool MinimaxSearch::shouldStop(bup &board, int depth) { // always return at some max depth regardless if (depth >= MAX_DEPTH) return true; - - bool jumpAvailable = heuristic.jumpeablePieces() != 0; - - if (jumpAvailable) return false; + else if (heuristic.jumpeablePieces() != 0) return false; else if (depth >= MIN_DEPTH) return true; else return false;