Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def prompt()
- print "> "
- end
- def gold_room()
- puts "This room is full of gold. How much do you take?"
- end
- gold_room;prompt;
- gold = gets().to_i
- gets()
- if gold < 20
- puts "Why so little #{gold}?"
- elsif gold > 20
- puts "You took #{gold} greedy man!"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement