Module adventure_text_UI :: Class Adventure_text_UI
[hide private]
[frames] | no frames]

Class Adventure_text_UI

source code

object --+
         |
        Adventure_text_UI

This class contains a fully text-based user interface for the Adventure game project.


See Also: ope.adventure.ui.adventure_GUI

Instance Methods [hide private]
 
__init__(self)
Sets up a new user interface and starts a new adventure from the beginning.
source code
 
run(self)
Runs the user interface.
source code
 
print_area_info(self)
Prints a description of the player's current location.
source code
 
play_turn(self)
Lets the user play a turn: asks for a command, executes it, and prints out the consequences.
source code
 
main(self)
Creates a user interface and starts it.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Sets up a new user interface and starts a new adventure from the beginning.

Overrides: object.__init__

run(self)

source code 

Runs the user interface. First, a welcome message is displayed. Then the user is repeatedly asked to play a turn until the adventure is over. Finally, a goodbye message is printed.