From bb0dbca86fa7c7966e0f599c4e80d5af26952ecc Mon Sep 17 00:00:00 2001 From: cjbolt Date: Wed, 2 Feb 2022 21:49:00 +0000 Subject: [PATCH] Fix drawchecker for mulithreaded mode. --- .../src/main/java/eubos/search/DrawChecker.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/EubosChess/src/main/java/eubos/search/DrawChecker.java b/EubosChess/src/main/java/eubos/search/DrawChecker.java index 78d148a1..00989ac8 100644 --- a/EubosChess/src/main/java/eubos/search/DrawChecker.java +++ b/EubosChess/src/main/java/eubos/search/DrawChecker.java @@ -6,19 +6,16 @@ public class DrawChecker { public static final boolean ENABLE_THREEFOLD_POSITION_DRAW_CHECK = true; - private long[] reachedPositions; - private int checkFromPly; + public long[] reachedPositions; + public int checkFromPly; public DrawChecker() { reachedPositions = new long[300]; } public DrawChecker(DrawChecker clone) { - reachedPositions = LongArrays.copy(clone.getState()); - } - - public long[] getState() { - return reachedPositions; + reachedPositions = LongArrays.copy(clone.reachedPositions); + checkFromPly = clone.checkFromPly; } public void reset(int plyNumber) {