jfreerails.server
Class CityTilePositioner

java.lang.Object
  extended by jfreerails.server.CityTilePositioner

public class CityTilePositioner
extends java.lang.Object

This class initialises cities and controls their growth. It makes changes to directly to the world object, so if the game has already started, use WorldDifferences and MapDiffMove to pass changes to the clients.

Author:
Luke

Field Summary
(package private)  java.util.ArrayList<TerrainType> industryTerrainTypes
           
(package private)  java.util.Random random
           
(package private)  java.util.ArrayList<TerrainType> resourceTerrainTypes
           
(package private)  java.util.ArrayList<TerrainType> urbanTerrainTypes
           
(package private)  World w
           
 
Constructor Summary
CityTilePositioner(World w)
           
 
Method Summary
private  void addIndustryTile(CityEconomicModel city)
           
private  void addResourceTile(CityEconomicModel city)
           
private  void addUrbanTile(CityEconomicModel city)
           
(package private)  void growCities()
           
(package private)  void initCities()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

random

java.util.Random random

urbanTerrainTypes

java.util.ArrayList<TerrainType> urbanTerrainTypes

industryTerrainTypes

java.util.ArrayList<TerrainType> industryTerrainTypes

resourceTerrainTypes

java.util.ArrayList<TerrainType> resourceTerrainTypes

w

World w
Constructor Detail

CityTilePositioner

public CityTilePositioner(World w)
Method Detail

initCities

void initCities()

addResourceTile

private void addResourceTile(CityEconomicModel city)

addIndustryTile

private void addIndustryTile(CityEconomicModel city)

addUrbanTile

private void addUrbanTile(CityEconomicModel city)

growCities

void growCities()