Ejemplo n.º 1
0
/**
 * Check if a tile is a depot and it is a depot of the given type.
 */
        public static bool IsDepotTypeTile(this TileIndex tile, TransportType type)
        {
            switch (type)
            {
            default: throw new NotReachedException();

            case TransportType.TRANSPORT_RAIL: return(tile.IsRailDepotTile());

            case TransportType.TRANSPORT_ROAD: return(tile.IsRoadDepotTile());

            case TransportType.TRANSPORT_WATER: return(tile.IsShipDepotTile());

            case TransportType.TRANSPORT_AIR: return(tile.IsHangarTile());
            }
        }
Ejemplo n.º 2
0
/**
 * Is the given tile a tile with a depot on it?
 * @param tile the tile to check
 * @return true if and only if there is a depot on the tile.
 */
        public static bool IsDepotTile(this TileIndex tile)
        {
            return(tile.IsRailDepotTile() || tile.IsRoadDepotTile() || tile.IsShipDepotTile() || tile.IsHangarTile());
        }