Class: Game
- Inherits:
-
Object
- Object
- Game
- Defined in:
- lib/my_own_maze/game.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#level ⇒ Object
Returns the value of attribute level.
Instance Method Summary collapse
- #do(action) ⇒ Object
-
#initialize(level = 1) ⇒ Game
constructor
A new instance of Game.
- #print_success ⇒ Object
- #start ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(level = 1) ⇒ Game
Returns a new instance of Game.
6 7 8 9 10 |
# File 'lib/my_own_maze/game.rb', line 6 def initialize(level = 1) @level = level set_config init_game end |
Instance Attribute Details
#level ⇒ Object
Returns the value of attribute level.
4 5 6 |
# File 'lib/my_own_maze/game.rb', line 4 def level @level end |
Instance Method Details
#do(action) ⇒ Object
20 21 22 |
# File 'lib/my_own_maze/game.rb', line 20 def do(action) raise "undefined do(#{action}) method" end |
#print_success ⇒ Object
24 25 26 |
# File 'lib/my_own_maze/game.rb', line 24 def print_success raise 'undefined print_success method' end |
#start ⇒ Object
12 13 14 |
# File 'lib/my_own_maze/game.rb', line 12 def start raise 'undefined start method' end |
#success? ⇒ Boolean
16 17 18 |
# File 'lib/my_own_maze/game.rb', line 16 def success? raise 'undefined success? method' end |