room 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/examples/example1.rb +22 -3
- data/lib/room.rb +1 -1
- data/room.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/examples/example1.rb
CHANGED
@@ -8,6 +8,7 @@ class Intro < Room
|
|
8
8
|
"This is Room," |
|
9
9
|
"a virtual world for you to explore." |
|
10
10
|
"At any time, you can type 'help', but it won't do anything." |
|
11
|
+
"I recommend falling back to 'look' instead." |
|
11
12
|
"" |
|
12
13
|
"Start by entering the room."
|
13
14
|
end
|
@@ -33,6 +34,10 @@ class Bedroom < Room
|
|
33
34
|
"Everything else is a blur."
|
34
35
|
end
|
35
36
|
|
37
|
+
def pencil
|
38
|
+
"That's not even close to a sentence. Where's the verb??"
|
39
|
+
end
|
40
|
+
|
36
41
|
def look_closet
|
37
42
|
@looked_left = true
|
38
43
|
"It looks like a normal closet." |
|
@@ -109,6 +114,7 @@ class Bedroom < Room
|
|
109
114
|
huh?
|
110
115
|
end
|
111
116
|
end
|
117
|
+
dup :look_right
|
112
118
|
|
113
119
|
def jump_into_chute
|
114
120
|
if @sharpened_pencil
|
@@ -135,13 +141,15 @@ class Closet < Room
|
|
135
141
|
(if @got_pencil
|
136
142
|
"No wait, you can still exit the closet."
|
137
143
|
else
|
138
|
-
"You stub your toe on something sharp. It feels like a pencil."
|
144
|
+
"You stub your toe on something sharp. It feels like a pencil." |
|
145
|
+
"You suddenly want to get the pencil."
|
139
146
|
end)
|
140
147
|
end
|
141
148
|
|
142
149
|
def stub_toe
|
143
150
|
"You already did that!"
|
144
151
|
end
|
152
|
+
dup :stub
|
145
153
|
|
146
154
|
def open_door
|
147
155
|
"The door won't budge."
|
@@ -164,7 +172,8 @@ class Closet < Room
|
|
164
172
|
else
|
165
173
|
take :pencil
|
166
174
|
@got_pencil = true
|
167
|
-
"Awesome, a pencil! You place the pencil in your pocket."
|
175
|
+
"Awesome, a pencil! You place the pencil in your pocket." |
|
176
|
+
"Something has changed around you."
|
168
177
|
end
|
169
178
|
end
|
170
179
|
dup :get_the_pencil
|
@@ -190,7 +199,17 @@ class Skiing1 < Room
|
|
190
199
|
"That was delicious." |
|
191
200
|
go("skiing2")
|
192
201
|
end
|
193
|
-
dup :eat_the_snow
|
202
|
+
dup :eat_the_snow, :swallow
|
203
|
+
|
204
|
+
def spit_snow
|
205
|
+
"You spit out that nasty snow!" |
|
206
|
+
go("skiing2")
|
207
|
+
end
|
208
|
+
dup :spit
|
209
|
+
|
210
|
+
def ski
|
211
|
+
go("skiing2")
|
212
|
+
end
|
194
213
|
end
|
195
214
|
|
196
215
|
class Skiing2 < Room
|
data/lib/room.rb
CHANGED
data/room.gemspec
CHANGED
metadata
CHANGED