1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Remove game.

This commit is contained in:
Rob Gleeson 2011-05-23 11:28:56 +01:00
parent dfb7bf472d
commit 8f50898100

View file

@ -3,25 +3,6 @@ class Pry
EasterEggs = Pry::CommandSet.new do
command "game", "" do |highest|
highest = highest ? highest.to_i : 100
num = rand(highest)
output.puts "Guess the number between 0-#{highest}: ('.' to quit)"
count = 0
while(true)
count += 1
str = Readline.readline("game > ", true)
break if str == "." || !str
val = str.to_i
output.puts "Too large!" if val > num
output.puts "Too small!" if val < num
if val == num
output.puts "Well done! You guessed right! It took you #{count} guesses."
break
end
end
end
command "east-coker", "" do
text = %{
--