SHARE
TWEET

Untitled

a guest Feb 10th, 2012 656 Never
  1. def g b=-1,t=101
  2.   puts (a=rand(b+1...t)),' high/low/right?'
  3.   (o=STDIN.gets)[/\Ah/] ? g(b,a) : o[/\Al/] ? g(a,t) : (puts "yay!")
  4. end;g
RAW Paste Data
Top