Skip to content

Commit

Permalink
Fix drawchecker for mulithreaded mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbolt committed Feb 2, 2022
1 parent a2a16e7 commit bb0dbca
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions EubosChess/src/main/java/eubos/search/DrawChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bb0dbca

Please sign in to comment.