diff options
Diffstat (limited to 'src/esieequest/model/Game.java')
-rw-r--r-- | src/esieequest/model/Game.java | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/src/esieequest/model/Game.java b/src/esieequest/model/Game.java index f7b773b..62dfc94 100644 --- a/src/esieequest/model/Game.java +++ b/src/esieequest/model/Game.java | |||
@@ -13,6 +13,7 @@ public class Game { | |||
13 | 13 | ||
14 | private final HashMap<String, Room> rooms; | 14 | private final HashMap<String, Room> rooms; |
15 | private Room currentRoom; | 15 | private Room currentRoom; |
16 | |||
16 | private final Stack<Room> previousRooms; | 17 | private final Stack<Room> previousRooms; |
17 | 18 | ||
18 | /** | 19 | /** |
@@ -214,6 +215,15 @@ public class Game { | |||
214 | } | 215 | } |
215 | 216 | ||
216 | /** | 217 | /** |
218 | * Returns the current room. | ||
219 | * | ||
220 | * @return the current room | ||
221 | */ | ||
222 | public Room getCurrentRoom() { | ||
223 | return this.currentRoom; | ||
224 | } | ||
225 | |||
226 | /** | ||
217 | * Returns the current room's exit located in the given direction. | 227 | * Returns the current room's exit located in the given direction. |
218 | * | 228 | * |
219 | * @param direction | 229 | * @param direction |
@@ -226,25 +236,6 @@ public class Game { | |||
226 | } | 236 | } |
227 | 237 | ||
228 | /** | 238 | /** |
229 | * Returns informations about the current room (description, exits and | ||
230 | * items). | ||
231 | * | ||
232 | * @return the informations about the current room | ||
233 | */ | ||
234 | public String getLocationInfo() { | ||
235 | return this.currentRoom.getInformations(); | ||
236 | } | ||
237 | |||
238 | /** | ||
239 | * Returns the current room's image name. | ||
240 | * | ||
241 | * @return the current room's image name. | ||
242 | */ | ||
243 | public String getLocationImageName() { | ||
244 | return this.currentRoom.getImageName(); | ||
245 | } | ||
246 | |||
247 | /** | ||
248 | * Returns the "eat" message. | 239 | * Returns the "eat" message. |
249 | * | 240 | * |
250 | * @return the "eat message | 241 | * @return the "eat message |