WorldState
Overview
Members
-
class WorldState
Public Functions
-
WorldState(string map, int loc)
Construct a new World State object.
- Parameters:
map –
string
representing the layout of the worldloc –
int
indicating the starting position
-
void display()
Prints the world state.
-
void moveLeft()
Moves left by one.
-
void moveRight()
Moves right by one.
-
char getPosition()
Get the current position.
- Returns:
char
-
WorldState(string map, int loc)