o1.adventure.draft.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.
Parameters
startingArea
the player’s initial location
Attributes
Graph
Reset zoom Hide graph Show graph
Supertypes
Members list
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.
Attributes
Determines if the player has indicated a desire to quit the game.
Determines if the player has indicated a desire to quit the game.
Attributes
Returns the current location of the player.
Returns the current location of the player.
Attributes
Signals that the player wants to quit the game.
Signals that the player wants to quit the game.
Attributes
Causes the player to rest for a short while. (This has no substantial effect in game terms.) Prints out a message stating that the player rests.
Causes the player to rest for a short while. (This has no substantial effect in game terms.) Prints out a message stating that the player rests.
Attributes
Returns a brief description of the player’s state, for debugging purposes.
Returns a brief description of the player’s state, for debugging purposes.
Attributes
Definition Classes