From 71701e00f52c99ec5fdfff6ad448d054081be93d Mon Sep 17 00:00:00 2001 From: zsalch Date: Sun, 14 Oct 2018 14:14:11 +0800 Subject: [PATCH 1/2] Display latest stone for ghost dead stone --- src/main/java/featurecat/lizzie/gui/BoardRenderer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/featurecat/lizzie/gui/BoardRenderer.java b/src/main/java/featurecat/lizzie/gui/BoardRenderer.java index 90c0a4a1e..e12eaeb55 100644 --- a/src/main/java/featurecat/lizzie/gui/BoardRenderer.java +++ b/src/main/java/featurecat/lizzie/gui/BoardRenderer.java @@ -384,7 +384,8 @@ private void drawBranch() { for (int i = 0; i < Board.BOARD_SIZE; i++) { for (int j = 0; j < Board.BOARD_SIZE; j++) { - if (Lizzie.board.getData().stones[Board.getIndex(i, j)] != Stone.EMPTY) continue; + // Display latest stone for ghost dead stone + // if (Lizzie.board.getData().stones[Board.getIndex(i, j)] != Stone.EMPTY) continue; if (branch.data.moveNumberList[Board.getIndex(i, j)] > maxBranchMoves()) continue; int stoneX = scaledMargin + squareLength * i; From b27c6d0fe2aeba58806b08fc99ad8c17dfce2576 Mon Sep 17 00:00:00 2001 From: zsalch Date: Thu, 25 Oct 2018 07:59:33 +0800 Subject: [PATCH 2/2] Fixed stone double shadow when branch --- src/main/java/featurecat/lizzie/gui/BoardRenderer.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/featurecat/lizzie/gui/BoardRenderer.java b/src/main/java/featurecat/lizzie/gui/BoardRenderer.java index e12eaeb55..42ee69192 100644 --- a/src/main/java/featurecat/lizzie/gui/BoardRenderer.java +++ b/src/main/java/featurecat/lizzie/gui/BoardRenderer.java @@ -385,14 +385,16 @@ private void drawBranch() { for (int i = 0; i < Board.BOARD_SIZE; i++) { for (int j = 0; j < Board.BOARD_SIZE; j++) { // Display latest stone for ghost dead stone - // if (Lizzie.board.getData().stones[Board.getIndex(i, j)] != Stone.EMPTY) continue; - if (branch.data.moveNumberList[Board.getIndex(i, j)] > maxBranchMoves()) continue; + int index = Board.getIndex(i, j); + Stone stone = branch.data.stones[index]; + boolean isGhost = (stone == Stone.BLACK_GHOST || stone == Stone.WHITE_GHOST); + if (Lizzie.board.getData().stones[index] != Stone.EMPTY && !isGhost) continue; + if (branch.data.moveNumberList[index] > maxBranchMoves()) continue; int stoneX = scaledMargin + squareLength * i; int stoneY = scaledMargin + squareLength * j; - drawStone( - g, gShadow, stoneX, stoneY, branch.data.stones[Board.getIndex(i, j)].unGhosted(), i, j); + drawStone(g, gShadow, stoneX, stoneY, stone.unGhosted(), i, j); } }