Skip to content

Commit

Permalink
Fix #869 (movenum of the first move)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiraoka committed Feb 9, 2021
1 parent 15f9462 commit 1e6ba97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/featurecat/lizzie/rules/Board.java
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,11 @@ public void place(int x, int y, Stone color, boolean newBranch, boolean changeMo
Stone[] stones = history.getStones().clone();
Zobrist zobrist = history.getZobrist();
Optional<int[]> lastMove = Optional.of(new int[] {x, y});
boolean isNewSubBranch = newBranch && !history.getData().firstBranch;
boolean isMissingMoveMNNumber = history.getMoveMNNumber() < 0;
int moveNumber = history.getMoveNumber() + 1;
int moveMNNumber =
!newBranch || history.getData().firstBranch ? history.getMoveMNNumber() + 1 : 1;
isNewSubBranch ? 1 : isMissingMoveMNNumber ? -1 : history.getMoveMNNumber() + 1;
int[] moveNumberList =
newBranch && history.getNext(true).isPresent()
? new int[Board.boardWidth * Board.boardHeight]
Expand Down

0 comments on commit 1e6ba97

Please sign in to comment.