Example #1
0
  public void tap() {

    if (land.isTapped()) {
      setRotate(0.0);
      land.setIsTapped(false);
    } else {
      setRotate(90.0);
      land.setIsTapped(true);
    }
  }
Example #2
0
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    LandNode landNode = (LandNode) o;

    return land.equals(landNode.land);
  }
Example #3
0
  private void initNode() {

    String css =
        "-fx-background-image: url(\"cards/"
            + land.getUrlName()
            + ".jpg\");"
            + "-fx-background-size: cover;";
    setStyle(css);

    setPrefWidth(156.0);
    setPrefHeight(222.5);

    setMaxWidth(156.0);
    setMaxHeight(222.5);
  }
Example #4
0
 @Override
 public int hashCode() {
   return land.hashCode();
 }
Example #5
0
  public boolean isTapped() {

    return land.isTapped();
  }
Example #6
0
  public LandNode(LandNode landNode) throws CopyException {

    this(Land.copy(landNode.getLand()));
  }