Class: CARPS::Player::Interface
- Inherits:
-
RolePlayInterface
- Object
- Interface
- QuitInterface
- RolePlayInterface
- CARPS::Player::Interface
- Defined in:
- lib/carps/mod/player/interface.rb
Overview
Player interface
Instance Method Summary collapse
-
#initialize(mod) ⇒ Interface
constructor
A new instance of Interface.
-
#run ⇒ Object
Output information about the game, then run.
Methods inherited from RolePlayInterface
Constructor Details
#initialize(mod) ⇒ Interface
Returns a new instance of Interface.
29 30 31 32 33 34 35 36 37 |
# File 'lib/carps/mod/player/interface.rb', line 29 def initialize mod super() @mod = mod add_command "act", "Take your turn." add_command "save", "Save the game." add_command "done", "Send your stuff to the dungeon master and await the next turn." add_command "sheet", "Look at your character sheet." add_command "edit", "Edit your character sheet." end |
Instance Method Details
#run ⇒ Object
Output information about the game, then run.
40 41 42 43 44 45 46 47 48 |
# File 'lib/carps/mod/player/interface.rb', line 40 def run if @mod.first_time? puts @mod.description UI::question "Press enter when you are ready to fill in your character sheet." edit @mod.configured end super end |