Class WorldMap

java.lang.Object
  extended by WorldMap

public class WorldMap
extends Object

This class exports the methods necessary to display the creatures on the screen. You should not change this class. You should have the following as the first line of your main:

createWorldMap(x, y); 
Only the Creature code should need to call the displaySquare method.


Constructor Summary
WorldMap()
           
 
Method Summary
static void createWorldMap(int x, int y)
          Initialize the world map to have size (x,y) and create the Window for it.
static void displaySquare(Position pos, char c, int dir, String color)
          Update the contents of the square indicated by pos.
static void pause(int millis)
          Pause for millis milliseconds.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorldMap

public WorldMap()
Method Detail

createWorldMap

public static void createWorldMap(int x,
                                  int y)
Initialize the world map to have size (x,y) and create the Window for it. This must be called once and only once.


displaySquare

public static void displaySquare(Position pos,
                                 char c,
                                 int dir,
                                 String color)
Update the contents of the square indicated by pos. If c is ' ', then the square is cleared, and dir and color are ignored.


pause

public static void pause(int millis)
Pause for millis milliseconds. Call this atleast once in the main simulation loop so that the computer can process mouse / keyboard events.