jfreerails.world.top
Class MapFixtureFactory

java.lang.Object
  extended by jfreerails.world.top.MapFixtureFactory

public class MapFixtureFactory
extends java.lang.Object

This class is used to generate fixtures for Junit tests.

Author:
Luke

Field Summary
static Player TEST_PLAYER
          Only subclasses should use these constants.
static FreerailsPrincipal TEST_PRINCIPAL
           
 
Constructor Summary
MapFixtureFactory()
           
 
Method Summary
static void generateCargoTypesList(World world)
          Adds hard coded cargo types.
private static void generateTerrainTypesList(World world)
          Adds hard coded terrain types.
static void generateTrackRuleList(World world)
           
static World getWorld(int w, int h)
          Returns a world object with a map of the specifed size with the terrain and cargo types setup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEST_PLAYER

public static final Player TEST_PLAYER
Only subclasses should use these constants.


TEST_PRINCIPAL

public static final FreerailsPrincipal TEST_PRINCIPAL
Constructor Detail

MapFixtureFactory

public MapFixtureFactory()
Method Detail

getWorld

public static World getWorld(int w,
                             int h)
Returns a world object with a map of the specifed size with the terrain and cargo types setup.


generateTrackRuleList

public static void generateTrackRuleList(World world)

generateCargoTypesList

public static void generateCargoTypesList(World world)
Adds hard coded cargo types.


generateTerrainTypesList

private static void generateTerrainTypesList(World world)
Adds hard coded terrain types.