Commit 21060e6 1 parent b7d6d50 commit 21060e6 Copy full SHA for 21060e6
File tree 3 files changed +12
-0
lines changed
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1
1
(player : "PLAYER" , items : {
2
2
"PLAYER" : (
3
+ names : ["self" , "myself" ],
3
4
locations : ["BRIG" ],
4
5
hp : 10 ,
5
6
),
Original file line number Diff line number Diff line change @@ -151,5 +151,15 @@ mod tests {
151
151
"You hit the goblin with your spear. It dies. It drops a dagger."
152
152
) ;
153
153
assert_eq ! ( game. ask( "take dagger" ) , "Taken." ) ;
154
+
155
+ // hit self
156
+ assert_eq ! (
157
+ game. ask( "hit self with the spear" ) ,
158
+ "You hit the self with your spear."
159
+ ) ;
160
+ assert_eq ! (
161
+ game. ask( "hit myself with my dagger" ) ,
162
+ "You hit the self with your dagger."
163
+ ) ;
154
164
}
155
165
}
Original file line number Diff line number Diff line change 1
1
(player : "PLAYER" , items : {
2
2
"PLAYER" : (
3
+ names : ["self" , "myself" ],
3
4
locations : ["CENTER ROOM" ],
4
5
hp : 10 ,
5
6
),
You can’t perform that action at this time.
0 commit comments