Example #1
0
 public void merge(Tile another) {
   getStyleClass().remove("tile-" + value);
   this.value += another.getValue();
   setText(value.toString());
   merged = true;
   getStyleClass().add("tile-" + value);
 }
Example #2
0
 public boolean isMergeable(Tile anotherTile) {
   return anotherTile != null && getValue().equals(anotherTile.getValue());
 }