Re: Simultaneous text input/output in a command line game


#1

Just from the tip of my head:

t = Thread.new {
while true
sleep 5
puts "What are you waiting for, dude? Enter something now: "
end
}
puts "Enter something: "
s = gets
t.kill
puts “You entered: #{s.inspect}”

Gennady.