Ejemplo n.º 1
0
  public void tilePlaced(Tile tile, TileLayer tileLayer) {
    Position p = tile.getPosition();

    removeLayer(AbstractTilePlacementLayer.class);
    removeLayer(PlacementHistory.class);

    if (p.x == left) --left;
    if (p.x == right) ++right;
    if (p.y == top) --top;
    if (p.y == bottom) ++bottom;

    tileLayer.tilePlaced(tile);

    if (client.getSettings().isShowHistory()) {
      showRecentHistory();
    }
    boolean initialPlacement =
        client.getActivePlayer() == null; // if active player is null we are placing initial tiles
    if ((!initialPlacement && !client.isClientActive())
        || (initialPlacement && tile.equals(client.getGame().getCurrentTile()))) {
      getAnimationService()
          .registerAnimation(tile.getPosition(), new RecentPlacement(tile.getPosition()));
    }
    repaint();
  }
Ejemplo n.º 2
0
 @Override
 public void forward() {
   if (client.isClientActive()) {
     if (secondPanel instanceof ForwardBackwardListener) {
       ((ForwardBackwardListener) secondPanel).forward();
     }
     client.getControlPanel().getActionPanel().forward();
   }
 }