示例#1
0
文件: Tile.java 项目: Gas91/fx2048
 public void merge(Tile another) {
   getStyleClass().remove("tile-" + value);
   this.value += another.getValue();
   setText(value.toString());
   merged = true;
   getStyleClass().add("tile-" + value);
 }
示例#2
0
文件: Tile.java 项目: Gas91/fx2048
 public boolean isMergeable(Tile anotherTile) {
   return anotherTile != null && getValue().equals(anotherTile.getValue());
 }