Module: Ui
- Included in:
- Codebreaker::Interface
- Defined in:
- lib/rk/codebreaker/interface_output.rb
Instance Method Summary collapse
- #goodbye ⇒ Object
- #greeting ⇒ Object
- #lucky_combination ⇒ Object
- #new_game_proposition ⇒ Object
- #no_attempts ⇒ Object
- #no_hint ⇒ Object
- #proposal_and_input ⇒ Object
- #save_result_proposition ⇒ Object
- #username ⇒ Object
Instance Method Details
#goodbye ⇒ Object
33 34 35 |
# File 'lib/rk/codebreaker/interface_output.rb', line 33 def goodbye puts "See You later!!!" end |
#greeting ⇒ Object
5 6 7 |
# File 'lib/rk/codebreaker/interface_output.rb', line 5 def greeting puts "Welcome! Let's begin our game." end |
#lucky_combination ⇒ Object
14 15 16 |
# File 'lib/rk/codebreaker/interface_output.rb', line 14 def lucky_combination puts "Congratulations! You won!" end |
#new_game_proposition ⇒ Object
28 29 30 31 |
# File 'lib/rk/codebreaker/interface_output.rb', line 28 def new_game_proposition puts "Do You want to play again ? (Enter 'y' if yes, or any button if no)" gets.chomp end |
#no_attempts ⇒ Object
37 38 39 |
# File 'lib/rk/codebreaker/interface_output.rb', line 37 def no_attempts puts "There are no attempts left" end |
#no_hint ⇒ Object
41 42 43 44 |
# File 'lib/rk/codebreaker/interface_output.rb', line 41 def no_hint puts "There is no hint left" true end |
#proposal_and_input ⇒ Object
9 10 11 12 |
# File 'lib/rk/codebreaker/interface_output.rb', line 9 def proposal_and_input puts "Please, enter your code or 'h' for hint" gets.chomp end |
#save_result_proposition ⇒ Object
18 19 20 21 |
# File 'lib/rk/codebreaker/interface_output.rb', line 18 def save_result_proposition puts "Do you want to save your results? (Enter 'y' if yes, or any button if no)" gets.chomp end |
#username ⇒ Object
23 24 25 26 |
# File 'lib/rk/codebreaker/interface_output.rb', line 23 def username puts "Enter your name" gets.chomp end |