Module: Ui

Included in:
Codebreaker::Interface
Defined in:
lib/rk/codebreaker/interface_output.rb

Instance Method Summary collapse

Instance Method Details

#goodbyeObject



33
34
35
# File 'lib/rk/codebreaker/interface_output.rb', line 33

def goodbye
  puts "See You later!!!"
end

#greetingObject



5
6
7
# File 'lib/rk/codebreaker/interface_output.rb', line 5

def greeting
  puts "Welcome! Let's begin our game."
end

#lucky_combinationObject



14
15
16
# File 'lib/rk/codebreaker/interface_output.rb', line 14

def lucky_combination
  puts "Congratulations! You won!"
end

#new_game_propositionObject



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_attemptsObject



37
38
39
# File 'lib/rk/codebreaker/interface_output.rb', line 37

def no_attempts
  puts "There are no attempts left"
end

#no_hintObject



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_inputObject



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_propositionObject



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

#usernameObject



23
24
25
26
# File 'lib/rk/codebreaker/interface_output.rb', line 23

def username
  puts "Enter your name"
  gets.chomp
end