Class: RSokoban::UI::BaseUI Abstract
- Inherits:
-
Object
- Object
- RSokoban::UI::BaseUI
- Defined in:
- lib/rsokoban/ui/base_ui.rb
Overview
This class is abstract.
Subclass and override #get_action to implement a working UI.
Every concrete UI should inherits from me.
Direct Known Subclasses
Instance Method Summary collapse
-
#get_action(hash) ⇒ PlayerAction
Based on things found in the
hash
argument, I display the game to the user. -
#initialize ⇒ BaseUI
constructor
A new instance of BaseUI.
Constructor Details
#initialize ⇒ BaseUI
Returns a new instance of BaseUI.
7 8 9 |
# File 'lib/rsokoban/ui/base_ui.rb', line 7 def initialize @level_title = '' end |
Instance Method Details
#get_action(hash) ⇒ PlayerAction
TODO:
write some examples
Based on things found in the hash
argument, I display the game to the user. Then he can tell what he wants to do. Whatever my childs permit the user to do, they can only return an ActionPlayer object.
29 30 31 |
# File 'lib/rsokoban/ui/base_ui.rb', line 29 def get_action(hash) raise "Please implement me !" end |