depth: 如果深度小于1则设置为1

为了调试需要, 新增 DEPTH_ADJUST 宏用于深度调整.
This commit is contained in:
Calcitem 2019-11-03 17:43:27 +08:00
parent e90266d3e1
commit d6307b5c61
3 changed files with 7 additions and 1 deletions

View File

@ -43,6 +43,8 @@
#define DEFAULT_RULE_NUMBER 1
#define DEPTH_ADJUST (0)
//#define HARD_LEVEL_DEPTH
//#define TIME_STAT

View File

@ -156,6 +156,10 @@ depth_t AIAlgorithm::changeDepth(depth_t origDepth)
d -= reduce;
}
d += DEPTH_ADJUST;
d = d >= 1 ? d : 1;
loggerDebug("Depth: %d\n", d);
return d;

View File

@ -23,7 +23,7 @@
#include "config.h"
using step_t = uint16_t;
using depth_t = uint8_t;
using depth_t = int8_t;
using location_t = uint8_t;
#ifdef TRANSPOSITION_TABLE_CUTDOWN