Class: Codebreaker::GameConsole
- Inherits:
-
Object
- Object
- Codebreaker::GameConsole
- Defined in:
- lib/console.rb
Instance Method Summary collapse
-
#initialize ⇒ GameConsole
constructor
A new instance of GameConsole.
- #play ⇒ Object
Constructor Details
#initialize ⇒ GameConsole
Returns a new instance of GameConsole.
5 6 7 |
# File 'lib/console.rb', line 5 def initialize @game = Game.new end |
Instance Method Details
#play ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/console.rb', line 9 def play loop do choice = break if choice == '0' case choice when '1' play_game save when '2' show_table end end end |