-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtime_traveler.rb
217 lines (208 loc) · 8.14 KB
/
time_traveler.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
require './game_node'
CURRENT_TIME = Time.now.strftime('%d %b %Y %I:%M %p')
class TimeTraveler
def build
# restart game after victory or loss
play_again = TimeTraveler.new
GameNode.new do
display %{
> Welcome TimeTraveler! My name is CloudR45. I was programmed
by Aaron Zomback around the foot hills of Beaujolais country in France.
I will be your travel agent during this hiring test.
Your current local time is #{CURRENT_TIME}.
Would you like to continue?"
}
option "yes" do
display %{
> We have little time to waste,
which century would you like to visit today?
}
option "13th" do
display %{
> Welcome to the 13th century! Genghis Khan and his
invading Mongols are riding towards you! What do you do?
}
option "jump" do
display %{
> ZOOM! You're now in the 19th century!
I hope that you've brought your winter clothes.
You've joined forces fighting in Napoleon's army.
As you march towards Russia the winter
gets colder and colder.
What do you do?
}
option "drink vodka" do
display %{
> G A M E O V E R...
You stumbled into the snow and froze to death.
Would you like to play again?
}
option "yes" do
play_again
end
option "no" do
display "Au revoir!"
quit
end
end
option "jump" do
display %{
> Et voilá!
You're now in the 22nd century! It's the year 2163
and Livestream's holographic AI technology is
helping you fight invading robots.
What do you do?
}
option "fight" do
display %{
> Congratulations you've won!
You helped Livestorm defeat the invading robots!
Would you like to play again?
}
option "yes" do
play_again
end
option "no" do
display "Au revoir!"
quit
end
end
option "hide" do
display %{
> G A M E O V E R.
There's no time for cowards!
Would you like to play again?
}
option "yes" do
play_again
end
option "no" do
display "Au revoir!"
quit
end
end
end
end
option "run" do
display %{
> G A M E O V E R ...
you've been run over and are now flat as a pancake.
Would you like to play again?
}
option "yes" do
play_again
end
option "no" do
display "Au revoir!"
quit
end
end
end
option "19th" do
display %{
> ZOOM! You're now in the 19th century!
I hope that you've brought your winter clothes.
You've joined forces fighting in Napoleon's army.
As you march towards Russia the winter
gets colder and colder.
What do you do?
}
option "jump" do
display %{
> Et voilá! You're now in the 22nd century! It's the year 2163
and Livestream's holographic AI technology is helping you fight invading robots.
What do you do?
}
option "hide" do
display %{
> G A M E O V E R.
There's no time for cowards!
Would you like to play again?
}
option "yes" do
play_again
end
option "no" do
display "Au revoir!"
quit
end
end
option "fight" do
display %{
> Congratulations you've won!
You helped Livestorm defeat the invading robots!
Would you like to play again?
}
option "yes" do
play_again
end
option "no" do
display "Au revoir!"
quit
end
end
end
option "drink vodka" do
display %{
> G A M E O V E R...
You stumbled into the snow and froze to death.
Would you like to play again?
}
option "yes" do
play_again
end
option "no" do
display "Au revoir!"
quit
end
end
end
option "22nd" do
display %{
> Et voilá!
You're now in the 22nd century!
It's the year 2163 and Livestream's
holographic AI technology is helping
you fight invading robots.
What do you do?
}
option "fight" do
display %{
> Congratulations you've won!
You helped Livestorm defeat the invading robots!
Would you like to play again?
}
option "yes" do
play_again
end
option "no" do
display "Au revoir!"
quit
end
end
option "hide" do
display %{
> G A M E O V E R.
There's no time for cowards!
Would you like to play again?
}
option "yes" do
play_again
end
option "no" do
display "Au revoir!"
quit
end
end
end
end
option "no" do
display "Ok, bye"
quit
end
option "help" do
display " > HELP SECTION: to QUIT press CTRL + C // To EXPLORE path type answer in lowercase!"
end
end
end
end