Player
A Player
object represents a player character controlled by the real-life
user of the program.
A player object’s state is mutable: the player’s location and possessions can change, for instance.
NOTE: The AdventureDraft module is not even close to being well designed. See Chapter 9.3 in the course materials.
- Value parameters:
- startingArea
the player’s initial location
Value members
Concrete methods
Attempts to move the player in the given direction. This is successful if there is an exit from the player’s current location towards the direction name. Prints out the results of the action.
Attempts to move the player in the given direction. This is successful if there is an exit from the player’s current location towards the direction name. Prints out the results of the action.
Determines if the player has indicated a desire to quit the game.
Determines if the player has indicated a desire to quit the game.