Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Start Game
- puts "Instructions: Type the letter marked for the options you choose! Enjoy!"
- puts "Welcome to Treasure Island"
- puts "You are a famous treasure hunter that has spent the last
- year looking for the treasure of the Spanish Armada, lost in
- in the Atlantic Ocean for centuries."
- puts "After a terrible storm your boat has wrecked at a unknown Island."
- def start_game
- puts "You are standing in the beach next to where the boat wrecked."
- puts "What do you want to do?"
- puts "Options: (w)alk around the island, Walk towards the (j)ungle, Wait for (h)elp"
- option1 = gets.chomp
- case option1
- when "w"
- start_walk
- when "j"
- start_jungle
- when "h"
- puts "You're are such an embarressment to Chuck Noland's legacy. Man up!"
- start_game
- else
- puts "At least try something, please!"
- start_game
- end
- end
- def start_walk
- puts "After hours walking you can only find sand and more sand."
- start_game
- end
- def start_jungle
- puts "You walk into the jungle and ends up into having two different paths."
- puts "One path leads to the top of the hill where you think you can see the tip of a lighthouse."
- puts "The other path leads to what looks like a little river in the distance."
- puts "Options: (g)o up hill, Go to (r)iver, return"
- option2 = gets.chomp
- case option2
- when "g"
- puts "You see a tall white lighthouse. Something is shinning at the top."
- start_lighthouse
- when "r"
- puts "The river is infested with alligators and you are trapped. You DIED. GAME OVER!"
- end_game
- when "return"
- start_game
- end
- end
- def start_lighthouse
- puts "There are two ways to go up the tower, inside through the stairs and a rope hanging outside."
- puts "Options: Climb through (s)tairs, Climb through (r)ope, return"
- option3 = gets.chomp
- case option3
- when "s"
- puts "The stairs are centuries old, they broke in half while you were almost at the top. You fell and DIED. GAME OVER."
- end_game
- when "r"
- puts "The rope is firm and you make your way to the top."
- start_light_top
- when "return"
- start_jungle
- end
- end
- def start_light_top
- puts "At the top of the lighthouse you see old object similar to a magnifying glass."
- puts "Options: Look through the (m)agnifying glass, Lean over the (b)alcony to see the view, return."
- option4 = gets.chomp
- case option4
- when "m"
- puts "You see through the glass the location where your boat wrecked. Under it sunken beneath lies the great Santa Isabel, spanish ship where the treasure was known to be."
- puts "Congratualations you have found the treasure! However, you have no clue how to leave the island. So sorry..."
- end_game
- when "b"
- "The balcony breaks and you fell. You DIED. GAME OVER!"
- end_game
- when "return"
- start_lighthouse
- end
- end
- def end_game
- "Thanks for playing."
- end
- start_game
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement