rails.game
Class Tile.Upgrade

java.lang.Object
  extended by rails.game.Tile.Upgrade
Enclosing class:
Tile

protected class Tile.Upgrade
extends java.lang.Object


Field Summary
(package private)  java.util.List<MapHex> allowedHexes
          Hexes where the upgrade can be executed
(package private)  java.util.List<java.lang.String> allowedPhases
          Phases in which the upgrade can be executed.
(package private)  java.util.List<MapHex> disallowedHexes
          Hexes where the upgrade cannot be executed Only one of allowedHexes and disallowedHexes should be used
(package private)  java.lang.String hexes
          A temporary String holding the in/excluded hexes.
(package private)  TileI tile
          The upgrade tile
(package private)  int tileId
          The upgrade tile id
 
Constructor Summary
protected Tile.Upgrade(int tileId)
           
 
Method Summary
protected  TileI getTile()
           
 int getTileId()
           
protected  boolean isAllowedForHex(MapHex hex)
           
protected  boolean isAllowedForHex(MapHex hex, java.lang.String phaseName)
           
protected  void setHexes(java.lang.String hexes)
           
protected  void setPhases(java.lang.String phases)
           
 void setTile(TileI tile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tileId

int tileId
The upgrade tile id


tile

TileI tile
The upgrade tile


allowedHexes

java.util.List<MapHex> allowedHexes
Hexes where the upgrade can be executed


disallowedHexes

java.util.List<MapHex> disallowedHexes
Hexes where the upgrade cannot be executed Only one of allowedHexes and disallowedHexes should be used


allowedPhases

java.util.List<java.lang.String> allowedPhases
Phases in which the upgrade can be executed.


hexes

java.lang.String hexes
A temporary String holding the in/excluded hexes. This will be processed at the first usage, because Tiles are initialised before the Map.

Constructor Detail

Tile.Upgrade

protected Tile.Upgrade(int tileId)
Method Detail

isAllowedForHex

protected boolean isAllowedForHex(MapHex hex,
                                  java.lang.String phaseName)

isAllowedForHex

protected boolean isAllowedForHex(MapHex hex)

setTile

public void setTile(TileI tile)

getTile

protected TileI getTile()

getTileId

public int getTileId()

setHexes

protected void setHexes(java.lang.String hexes)

setPhases

protected void setPhases(java.lang.String phases)