rle.simple.board
Class BoardBuilder

java.lang.Object
  extended by rle.core.vm.PlugInBase
      extended by rle.simple.board.BoardBuilder
All Implemented Interfaces:
PlugIn
Direct Known Subclasses:
TownBuilder

public class BoardBuilder
extends PlugInBase

Provides board creation capabilities.


Field Summary
protected  Board board
           
protected  CreationContext cc
           
 
Fields inherited from class rle.core.vm.PlugInBase
config, context, parameters
 
Constructor Summary
BoardBuilder()
           
 
Method Summary
 void buildBoard(CreationContext cc, Board board)
          Build up a board.
 void placeCreature(Creature c)
          Place a creature somewhere legal.
protected  void placeItem(Item item)
          Place an item somewhere legal.
protected  void placeRandomItem()
          Pick a random item and place it somewhere.
protected  void placeRandomMonster()
          Pick a random monster and place it somewhere.
 
Methods inherited from class rle.core.vm.PlugInBase
config, getContext, getParameters, paramMap, setConfig, setParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

board

protected Board board

cc

protected CreationContext cc
Constructor Detail

BoardBuilder

public BoardBuilder()
Method Detail

buildBoard

public void buildBoard(CreationContext cc,
                       Board board)
Build up a board. Note that, generally speaking, the board passed in will NOT be the same as GameContext.currentBoard(), the board currently in use.


placeRandomMonster

protected void placeRandomMonster()
Pick a random monster and place it somewhere.


placeRandomItem

protected void placeRandomItem()
Pick a random item and place it somewhere.


placeItem

protected void placeItem(Item item)
Place an item somewhere legal.

Parameters:
item -

placeCreature

public void placeCreature(Creature c)
Place a creature somewhere legal.

Parameters:
c -