Skip to content

Commit

Permalink
Number Tile working
Browse files Browse the repository at this point in the history
  • Loading branch information
charlestian23 committed Oct 3, 2023
1 parent 1357dbd commit f3ba447
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main/java/edu/rpi/legup/puzzle/lightup/LightUpCell.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,26 @@ public void setType(Element e, MouseEvent m) {
case "LTUP-UNPL-0003":
this.data = -2;
break;
case "LTUP-UNPL-0001":
switch (m.getButton()){
case MouseEvent.BUTTON1:
if (this.data < 0 || this.data > 3) {
this.data = 0;
}
else {
this.data = this.data + 1;
}
break;
case MouseEvent.BUTTON3:
if (this.data > 0) {
this.data = this.data - 1;
}
else {
this.data = 4;
}
break;
}
break;
}
}

Expand Down

0 comments on commit f3ba447

Please sign in to comment.