Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiraoka committed Feb 10, 2021
2 parents 70f3b2e + e1d279c commit bdcb62b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/main/java/featurecat/lizzie/gui/BoardRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ private void drawBranch() {
variation = suggestedMove.get().variation;
}
}
Branch branch = new Branch(Lizzie.board, variation, displayedBranchLength);
Branch branch = new Branch(Lizzie.board, variation, -1);
if (isMainBoard) mouseOverCoords = suggestedMove.get().coordinate;
branchOpt = Optional.of(branch);
variationOpt = Optional.of(variation);
Expand Down Expand Up @@ -799,14 +799,13 @@ private void drawMoveNumbers(Graphics2D g) {
boolean isMouseOver = isMainBoard && Lizzie.frame.isMouseOver(i, j);
if (moveNumberList[Board.getIndex(i, j)] > 0 && (!branchOpt.isPresent() || !isMouseOver)) {
boolean reverse = (moveNumberList[Board.getIndex(i, j)] > maxBranchMoves());
if (reverse && !Lizzie.config.showRawBoard) continue;
if (lastMoveOpt.isPresent() && lastMoveOpt.get()[0] == i && lastMoveOpt.get()[1] == j) {
if (reverse) continue;
g.setColor(Color.RED.brighter()); // stoneHere.isBlack() ? Color.RED.brighter() :
// Color.BLUE.brighter());
} else {
// Draw white letters on black stones nomally.
// But use black letters for showing black moves without stones.
if (reverse) continue;
g.setColor(stoneHere.isBlack() ^ reverse ? Color.WHITE : Color.BLACK);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/featurecat/lizzie/gui/Input.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public void keyPressed(KeyEvent e) {
} else if (controlIsPressed(e)) {
undo(10);
} else {
if (Lizzie.frame.isMouseOver) {
if (Lizzie.frame.isMouseOver && !Lizzie.config.showRawBoard) {
Lizzie.frame.doBranch(-1);
} else {
undo();
Expand All @@ -281,7 +281,7 @@ public void keyPressed(KeyEvent e) {
} else if (controlIsPressed(e)) {
redo(10);
} else {
if (Lizzie.frame.isMouseOver) {
if (Lizzie.frame.isMouseOver && !Lizzie.config.showRawBoard) {
Lizzie.frame.doBranch(1);
} else {
redo();
Expand Down

0 comments on commit bdcb62b

Please sign in to comment.