Use puts to print the screen and gets to get the user’s input.
I’m guessing you want to add something like
puts “pls press -1 to stop game”
answer = gets
if answer.to_i == -1 or answer == randomnumber
puts “Continue or stop? (y/n)”
answer = gets
if answer.chomps == “y”
puts “Thank you for playing, game over.”
Process.exit
end
end
Was that any help?