|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Control
public class Control
This class represents the Control within our game.
Constructor Summary | |
---|---|
Control()
|
Method Summary | |
---|---|
static void |
advanceTurn(double movementTime,
int numOxen,
boolean isMoving)
This method updates game state. |
static void |
possiblyEndGame()
Currently a dummy method. |
static void |
printLocationCommands()
This method prints the commands available for the location to the screen. |
static void |
takeTurn()
This is the primary method for performing an action at a location. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Control()
Method Detail |
---|
public static void printLocationCommands()
public static void possiblyEndGame()
public static void advanceTurn(double movementTime, int numOxen, boolean isMoving)
movementTime
- The amount of time to move.numOxen
- The number of propulsion items (oxen, rockets, etc.)isMoving
- boolean flag to indicate whether or not the Vehicle is movingpublic static void takeTurn()
Parser.parse()
), then takes the appropriate action
based on that command. The possible actions include traveling
to another location, entering the market at the current
location, printing the vehicle's inventory, printing the map of
the Universe, and quiting
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |