Skip to content

Commit

Permalink
Delete blanks, spaces, divide some lines due to PR
Browse files Browse the repository at this point in the history
  • Loading branch information
phiming committed Oct 5, 2018
1 parent 25f74cf commit 2a22123
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/main/java/featurecat/lizzie/gui/LizzieFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,7 @@ private void setPanelFont(Graphics2D g, float size) {
public void onClicked(int x, int y) {
// check for board click
int[] boardCoordinates = boardRenderer.convertScreenToCoordinates(x, y);
int moveNumber = winrateGraph.moveNumber(x, y);

int moveNumber = winrateGraph.moveNumber(x, y);
if (boardCoordinates != null) {
if (Lizzie.board.inAnalysisMode())
Lizzie.board.toggleAnalysis();
Expand All @@ -824,7 +823,7 @@ public void onClicked(int x, int y) {
}

if (Lizzie.config.showVariationGraph) {
Lizzie.frame.variationTree.jumpVariationTree(x,y);
Lizzie.frame.variationTree.jumpVariationTree(x, y);
}

repaint();
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/featurecat/lizzie/gui/VariationTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ public class VariationTree {
private int XSPACING;
private int DOT_DIAM = 11; // Should be odd number

private ArrayList<Integer> laneUsageList, laneUsageList1;
private ArrayList<Integer> laneUsageList, laneUsageList1; //laneUsageList1 is lane used to cacalate (x,y)
private BoardHistoryNode curMove, curMove1;

private int posx1, posy1, width1, height1; //Reserve a copy of varaition window axis

public VariationTree()
{
laneUsageList = new ArrayList<Integer>();
laneUsageList1 = new ArrayList<Integer>(); //for mouse click event
laneUsageList1 = new ArrayList<Integer>(); //for mouse click event
}

public void drawTree(Graphics2D g, int posx, int posy, int startLane, int maxposy, BoardHistoryNode startNode, int variationNumber, boolean isMain)
Expand Down Expand Up @@ -117,7 +117,10 @@ public void draw(Graphics2D g, int posx, int posy, int width, int height) {
YSPACING = (Lizzie.config.showLargeSubBoard() ? 20 : 30);
XSPACING = YSPACING;

posx1=posx;posy1=posy;width1=width;height1=height; //backup for mouse click event
posx1 = posx;
posy1 = posy;
width1 = width;
height1 = height; //backup for mouse click event

// Draw background
g.setColor(new Color(0, 0, 0, 60));
Expand Down Expand Up @@ -147,8 +150,6 @@ public void draw(Graphics2D g, int posx, int posy, int width, int height) {
}
drawTree(g, posx + xoffset, curposy, 0, posy + height, node, 0,true);
}


//Clone from drawTree() method but draw nothing, just caculate (x,y)->BoardNode
public BoardHistoryNode inSubtree(int posx, int posy, int mouseX, int mouseY, int startLane, int maxposy, BoardHistoryNode startNode, int variationNumber)
{
Expand Down

0 comments on commit 2a22123

Please sign in to comment.