diff options
-rw-r--r-- | src/esieequest/model/Game.java | 76 |
1 files changed, 29 insertions, 47 deletions
diff --git a/src/esieequest/model/Game.java b/src/esieequest/model/Game.java index d5e7bfd..f7b773b 100644 --- a/src/esieequest/model/Game.java +++ b/src/esieequest/model/Game.java | |||
@@ -51,8 +51,7 @@ public class Game { | |||
51 | * @param exitRoomName | 51 | * @param exitRoomName |
52 | * the name of the exit room | 52 | * the name of the exit room |
53 | */ | 53 | */ |
54 | private void setRoomExit(final String roomName, final String direction, | 54 | private void setRoomExit(final String roomName, final String direction, final String exitRoomName) { |
55 | final String exitRoomName) { | ||
56 | this.rooms.get(roomName).addExit(direction, this.rooms.get(exitRoomName)); | 55 | this.rooms.get(roomName).addExit(direction, this.rooms.get(exitRoomName)); |
57 | } | 56 | } |
58 | 57 | ||
@@ -84,27 +83,20 @@ public class Game { | |||
84 | this.createRoom("WingCorridorOne", "in the corridor in wing #3, on the ground floor"); | 83 | this.createRoom("WingCorridorOne", "in the corridor in wing #3, on the ground floor"); |
85 | this.createRoom("WingStairsOne", "in the stairwell on the ground floor"); | 84 | this.createRoom("WingStairsOne", "in the stairwell on the ground floor"); |
86 | this.createRoom("WingStairsTwo", "in the stairwell on the first floor"); | 85 | this.createRoom("WingStairsTwo", "in the stairwell on the first floor"); |
87 | this.createRoom("WingCorridorTwo", "in the corridor in wind #3, on the first floor"); | 86 | this.createRoom("WingCorridorTwo", "in the corridor in wing #3, on the first floor"); |
88 | this.createRoom("WingCorridorTwoOffice", "in front of the office #3254"); | 87 | this.createRoom("WingCorridorTwoOffice", "in front of the office #3254"); |
89 | this.createRoom("WingOffice", "in the office #3254"); | 88 | this.createRoom("WingOffice", "in the office #3254"); |
90 | 89 | ||
91 | this.createRoom("OffscriptEat", "somewhere implementing hunger"); | 90 | this.createRoom("OffscriptItems", "somewhere implementing weight"); |
92 | this.createRoom("OffscriptEatPantry", "in the pantry"); | 91 | this.createRoom("OffscriptItemsStorageroom", "in a storage room"); |
93 | this.createRoom("OffscriptTake", "somewhere implementing weight"); | 92 | this.createRoom("OffscriptTime", "somewhere implementing time"); |
94 | this.createRoom("OffscriptTakeStorageroom", "in a storage room"); | 93 | this.createRoom("OffscriptTimeCountdownroom", "in a dangerous room"); |
95 | this.createRoom("OffscriptTimeout", "somewhere implementing time"); | 94 | this.createRoom("OffscriptTeleportation", "somewhere implementing teleportation"); |
96 | this.createRoom("OffscriptTimeoutCountdownroom", "in a dangerous room"); | 95 | this.createRoom("OffscriptTeleportationAnchorroom", "on a checkpoint"); |
97 | this.createRoom("OffscriptTrapdoor", "somewhere implementing a trap"); | ||
98 | this.createRoom("OffscriptTrapdoorDeadend", "trapped"); | ||
99 | this.createRoom("OffscriptBeamer", "somewhere implementing teleportation"); | ||
100 | this.createRoom("OffscriptBeamerAnchor", "on a checkpoint"); | ||
101 | this.createRoom("OffscriptLock", "somewhere implementing a doorlock"); | ||
102 | this.createRoom("OffscriptLockLockedroom", "in a locked room that is not anymore"); | ||
103 | this.createRoom("OffscriptAlea", "somewhere implementing alea"); | 96 | this.createRoom("OffscriptAlea", "somewhere implementing alea"); |
104 | this.createRoom("OffscriptAleaRoomrandomizer", | 97 | this.createRoom("OffscriptAleaRandomizingroom", "in a weird room that will transport you somewhere else"); |
105 | "in a weird room that will transport you somewhere else"); | ||
106 | this.createRoom("OffscriptMovingcharacter", "somewhere implementing a moving character"); | 98 | this.createRoom("OffscriptMovingcharacter", "somewhere implementing a moving character"); |
107 | this.createRoom("OffscriptMovingcharacterMo", "in M-O's room"); | 99 | this.createRoom("OffscriptMovingcharacterSumobotroom", "in the Chirac-101's room"); |
108 | 100 | ||
109 | } | 101 | } |
110 | 102 | ||
@@ -149,7 +141,7 @@ public class Game { | |||
149 | this.setRoomExit("WingStreet", "east", "ClubnixStreet"); | 141 | this.setRoomExit("WingStreet", "east", "ClubnixStreet"); |
150 | this.setRoomExit("WingCorridorOne", "west", "WingStairsOne"); | 142 | this.setRoomExit("WingCorridorOne", "west", "WingStairsOne"); |
151 | this.setRoomExit("WingCorridorOne", "south", "WingStreet"); | 143 | this.setRoomExit("WingCorridorOne", "south", "WingStreet"); |
152 | this.setRoomExit("WingCorridorOne", "east", "OffscriptEat"); | 144 | this.setRoomExit("WingCorridorOne", "east", "OffscriptItems"); |
153 | this.setRoomExit("WingStairsOne", "south", "WingStairsTwo"); | 145 | this.setRoomExit("WingStairsOne", "south", "WingStairsTwo"); |
154 | this.setRoomExit("WingStairsOne", "up", "WingStairsTwo"); | 146 | this.setRoomExit("WingStairsOne", "up", "WingStairsTwo"); |
155 | this.setRoomExit("WingStairsOne", "east", "WingCorridorOne"); | 147 | this.setRoomExit("WingStairsOne", "east", "WingCorridorOne"); |
@@ -157,40 +149,30 @@ public class Game { | |||
157 | this.setRoomExit("WingStairsTwo", "down", "WingStairsOne"); | 149 | this.setRoomExit("WingStairsTwo", "down", "WingStairsOne"); |
158 | this.setRoomExit("WingStairsTwo", "east", "WingCorridorTwo"); | 150 | this.setRoomExit("WingStairsTwo", "east", "WingCorridorTwo"); |
159 | this.setRoomExit("WingCorridorTwo", "north", "WingCorridorTwoOffice"); | 151 | this.setRoomExit("WingCorridorTwo", "north", "WingCorridorTwoOffice"); |
152 | this.setRoomExit("WingCorridorTwo", "west", "WingStairsTwo"); | ||
160 | this.setRoomExit("WingCorridorTwoOffice", "south", "WingCorridorTwo"); | 153 | this.setRoomExit("WingCorridorTwoOffice", "south", "WingCorridorTwo"); |
161 | this.setRoomExit("WingCorridorTwoOffice", "east", "WingOffice"); | 154 | this.setRoomExit("WingCorridorTwoOffice", "east", "WingOffice"); |
162 | this.setRoomExit("WingOffice", "west", "WingCorridorTwoOffice"); | 155 | this.setRoomExit("WingOffice", "west", "WingCorridorTwoOffice"); |
163 | 156 | ||
164 | this.setRoomExit("OffscriptEat", "north", "OffscriptEatPantry"); | 157 | this.setRoomExit("OffscriptItems", "north", "OffscriptItemsStorageroom"); |
165 | this.setRoomExit("OffscriptEat", "west", "WingCorridorOne"); | 158 | this.setRoomExit("OffscriptItems", "west", "WingCorridorOne"); |
166 | this.setRoomExit("OffscriptEat", "east", "OffscriptTake"); | 159 | this.setRoomExit("OffscriptItems", "east", "OffscriptTime"); |
167 | this.setRoomExit("OffscriptEatPantry", "south", "OffscriptEat"); | 160 | this.setRoomExit("OffscriptItemsStorageroom", "south", "OffscriptItems"); |
168 | this.setRoomExit("OffscriptTake", "north", "OffscriptTakeStorageroom"); | 161 | this.setRoomExit("OffscriptTime", "north", "OffscriptTimeCountdownroom"); |
169 | this.setRoomExit("OffscriptTake", "west", "OffscriptEat"); | 162 | this.setRoomExit("OffscriptTime", "west", "OffscriptTakeStorageroom"); |
170 | this.setRoomExit("OffscriptTake", "east", "OffscriptTimeout"); | 163 | this.setRoomExit("OffscriptTime", "east", "OffscriptTeleportation"); |
171 | this.setRoomExit("OffscriptTakeStorageroom", "south", "OffscriptTake"); | 164 | this.setRoomExit("OffscriptTimeCountdownroom", "south", "OffscriptTime"); |
172 | this.setRoomExit("OffscriptTimeout", "north", "OffscriptTimeoutCountdownroom"); | 165 | this.setRoomExit("OffscriptTeleportation", "north", "OffscriptTeleportationAnchorroom"); |
173 | this.setRoomExit("OffscriptTimeout", "west", "OffscriptTakeStorageroom"); | 166 | this.setRoomExit("OffscriptTeleportation", "west", "OffscriptTime"); |
174 | this.setRoomExit("OffscriptTimeout", "east", "OffscriptTrapdoor"); | 167 | this.setRoomExit("OffscriptTeleportation", "east", "OffscriptAlea"); |
175 | this.setRoomExit("OffscriptTimeoutCountdownroom", "south", "OffscriptTimeout"); | 168 | this.setRoomExit("OffscriptTeleportationAnchorroom", "south", "OffscriptTeleportation"); |
176 | this.setRoomExit("OffscriptTrapdoor", "north", "OffscriptTrapdoorDeadend"); | 169 | this.setRoomExit("OffscriptAlea", "north", "OffscriptAleaRandomizingroom"); |
177 | this.setRoomExit("OffscriptTrapdoor", "west", "OffscriptTimeout"); | 170 | this.setRoomExit("OffscriptAlea", "west", "OffscriptTeleportation"); |
178 | this.setRoomExit("OffscriptTrapdoor", "east", "OffscriptBeamer"); | ||
179 | this.setRoomExit("OffscriptTrapdoorDeadend", "south", "OffscriptTrapdoor"); | ||
180 | this.setRoomExit("OffscriptBeamer", "north", "OffscriptBeamerAnchor"); | ||
181 | this.setRoomExit("OffscriptBeamer", "west", "OffscriptTrapdoor"); | ||
182 | this.setRoomExit("OffscriptBeamer", "east", "OffscriptLock"); | ||
183 | this.setRoomExit("OffscriptBeamerAnchor", "south", "OffscriptBeamer"); | ||
184 | this.setRoomExit("OffscriptLock", "north", "OffscriptLockLockedroom"); | ||
185 | this.setRoomExit("OffscriptLock", "west", "OffscriptBeamer"); | ||
186 | this.setRoomExit("OffscriptLock", "east", "OffscriptAlea"); | ||
187 | this.setRoomExit("OffscriptLockLockedroom", "south", "OffscriptLock"); | ||
188 | this.setRoomExit("OffscriptAlea", "north", "OffscriptAleaRoomrandomizer"); | ||
189 | this.setRoomExit("OffscriptAlea", "west", "OffscriptLock"); | ||
190 | this.setRoomExit("OffscriptAlea", "east", "OffscriptMovingcharacter"); | 171 | this.setRoomExit("OffscriptAlea", "east", "OffscriptMovingcharacter"); |
191 | this.setRoomExit("OffscriptAleaRoomrandomizer", "south", "OffscriptAlea"); | 172 | this.setRoomExit("OffscriptAleaRandomizingroom", "south", "OffscriptAlea"); |
192 | this.setRoomExit("OffscriptMovingcharacter", "north", "OffscriptMovingcharacterMo"); | 173 | this.setRoomExit("OffscriptMovingcharacter", "north", "OffscriptMovingcharacterSumobotroom"); |
193 | this.setRoomExit("OffscriptMovingcharacter", "west", "OffscriptAlea"); | 174 | this.setRoomExit("OffscriptMovingcharacter", "west", "OffscriptAlea"); |
175 | this.setRoomExit("OffscriptMovingcharacterSumobotroom", "south", "OffscriptMovingcharacter"); | ||
194 | } | 176 | } |
195 | 177 | ||
196 | /** | 178 | /** |