WorldState

Overview

Members

class WorldState

Public Functions

WorldState(string map, int loc)

Construct a new World State object.

Parameters:
  • mapstring representing the layout of the world

  • locint 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