Created
February 27, 2016 00:36
-
-
Save mindplace/1566ff435e1b25567ed4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Adventure | |
attr_reader :user, :gender | |
def initialize(name) | |
@user = name | |
@gender = set_gender | |
end | |
def set_gender | |
print "Art thou a she, a he, or sommat else? (she, he, else) " | |
answer = gets.chomp | |
gender = ["She", "she", "Her", "her"] if answer == "she" | |
gender = ["He", "he", "His", "his"] if answer == "he" | |
gender = ["Their", "their", "Their", "their"] if answer == "else" | |
gender | |
end | |
def singeres | |
lines = File.readlines("singeres.txt") | |
print "\n[Press enter to go to the next line!]" | |
gets | |
lines.each do |line| | |
print eval(line); gets | |
end | |
end | |
def pirates | |
puts "\nAhoy, the villain!" | |
insult = ["blogger", "nincompoop", "Queen's assassin"].sample | |
puts "\nBehold, lads, we have ourselves a #{insult}!" | |
print "\n[do you respond to this insulting language?!] " | |
gets | |
puts "\nNay, verily thou art a #{insult}! Thou art the v'ry spit of a #{insult}!" | |
print "\n[insult back!!] " | |
gets | |
puts "\nAh, insult me, wilt thou? Come at me, thou yellow-bellied #{insult}!" | |
puts "I fart in yer general direction!!" | |
puts "Yer mother was a #{["hamster", "hedgehog", "goldfish"].sample}, and yer father" | |
puts "smelt of #{["elderberries", "coconuts", "pineapples"].sample}!!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment