-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepl.rb
110 lines (104 loc) · 4.55 KB
/
repl.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
puts "You wake up cold, alone, and uninjured in a pitch black cave"
puts "What do you want to do?"
puts "Options: look around, cry, stay still and listen"
option = gets.chomp
case option
when "look around"
puts "...it's a dark cave."
puts "Now what?: Lay down and die, feel the walls, sit and listen"
now_what = gets.chomp
case now_what
when "lay down and die"
puts "Wow what a loser. You die. The end"
when "feel the walls"
puts "After some scratched palms and bruised pride you feel a tunnel entrance"
puts "Next?: Stay put, follow the tunnel"
and_then = gets.chomp
case and_then
when "stay put"
puts "you eventually starve and die. The End."
when "follow the tunnel"
puts "After an hour of feeling your way around the walls and bumping into stelagmites you emerge battered and bruised into a forrest."
puts "Next?: Stay put, follow the tunnel"
and_then = gets.chomp
case and_then
when "stay put"
puts "Congrats, you got out of the cave but still died."
when "start walking"
puts "It takes a few hours but you make it to the road and get a ride back to town. YOu still have no idea how you got into the cave."
end
end
end
when "sit and listen"
puts "You hear water dripping from the left."
puts "Follow the sound or stay?"
next_option = gets.chomp
case next_option
when "Follow the sound"
puts "You walk to the left with your hands out until you brush the wall, a few inches from your fingers is the start of a tunnel."
puts "Next?: Stay put, follow the tunnel"
and_then = gets.chomp
case and_then
when "stay put"
puts "you eventually starve and die. The End."
when "follow the tunnel"
puts "After an hour of feeling your way around the walls and bumping into stelagmites you emerge battered and bruised into a forrest."
puts "Next?: Stay put, start walking"
and_then = gets.chomp
case and_then
when "stay put"
puts "Congrats, you got out of the cave but still died."
when "start walking"
puts "It takes a few hours but you make it to the road and get a ride back to town. YOu still have no idea how you got into the cave."
end
end
when "stay"
puts "You stay in the cave and die all alone."
end
when "cry"
puts "Now what's that going to accomplish?"
puts "Now what?: Lay down and die, feel the walls, sit and listen"
now_what = gets.chomp
case now_what
when "lay down and die"
puts "Wow what a loser. You die. The end"
when "feel the walls"
puts "After some scratched palms and bruised pride you feel a tunnel entrance"
puts "Next?: Stay put, follow the tunnel"
and_then = gets.chomp
case and_then
when "stay put"
puts "you eventually starve and die. The End."
when "follow the tunnel"
puts "After an hour of feeling your way around the walls and bumping into stelagmites you emerge battered and bruised into a forrest."
puts "Next?: Stay put, start walking"
and_then = gets.chomp
case and_then
when "stay put"
puts "Congrats, you got out of the cave but still died."
when "start walking"
puts "It takes a few hours but you make it to the road and get a ride back to town. YOu still have no idea how you got into the cave."
end
end
end
when "stay still and listen"
puts "You hear water dripping from the left."
puts "Next?: Stay put, follow the tunnel"
and_then = gets.chomp
case and_then
when "stay put"
puts "you eventually starve and die. The End."
when "follow the tunnel"
puts "After an hour of feeling your way around the walls and bumping into stelagmites you emerge battered and bruised into a forrest."
puts "Next?: Stay put, start walking"
and_then = gets.chomp
case and_then
when "stay put"
puts "Congrats, you got out of the cave but still died."
when "start walking"
puts "It takes a few hours but you make it to the road and get a ride back to town. YOu still have no idea how you got into the cave."
end
end
else
puts "You've got to do something or you'll die here."
end