Class: Tarzan::Interfaces::Base::Interface
- Inherits:
-
Object
- Object
- Tarzan::Interfaces::Base::Interface
show all
- Defined in:
- lib/tarzan/interfaces/base/interface.rb
Instance Method Summary
collapse
Instance Method Details
#play ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/tarzan/interfaces/base/interface.rb', line 8
def play
say %{Welcome to the Game Hall}
say %{Pick [R]ockPaperScissors or [O]ddsAndEvens: }
game = case prompt(['R', 'O'])
when 'R' then Tarzan::Games::RockPaperScissors::Game.new interface: self
when 'O' then Tarzan::Games::OddsAndEvens::Game.new interface: self
end
game.play
say %{Goodbye, and come back to the Game Hall}
end
|
#prompt(valid_choices = []) ⇒ Object
27
28
29
|
# File 'lib/tarzan/interfaces/base/interface.rb', line 27
def prompt(valid_choices = [])
end
|
#say(message) ⇒ Object
23
24
25
|
# File 'lib/tarzan/interfaces/base/interface.rb', line 23
def say(message)
end
|