diff options
author | Pacien TRAN-GIRARD | 2014-05-18 23:46:42 +0200 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2014-05-18 23:46:42 +0200 |
commit | e9cd16ec488e951ece912525ec766a1fed57a629 (patch) | |
tree | 3b7480e648925d08f8ffd8d2e0684176f33058c4 | |
parent | 1ac58713d0251a05c128f7ec1aacfde6cbd3249b (diff) | |
download | esieequest-e9cd16ec488e951ece912525ec766a1fed57a629.tar.gz |
Move the TransporterDoor in a dedicated Room to comply with the exercise
-rw-r--r-- | src/esieequest/model/Game.java | 3 | ||||
-rw-r--r-- | src/esieequest/model/map/Room.java | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/esieequest/model/Game.java b/src/esieequest/model/Game.java index 5f0150d..27237bf 100644 --- a/src/esieequest/model/Game.java +++ b/src/esieequest/model/Game.java | |||
@@ -126,7 +126,8 @@ public class Game implements SerialisableObject { | |||
126 | lockedDoorExit.setKey(Item.KEYCARD); | 126 | lockedDoorExit.setKey(Item.KEYCARD); |
127 | this.d(Room.LOCKED_ROOM, Direction.NORTH, lockedDoorExit); | 127 | this.d(Room.LOCKED_ROOM, Direction.NORTH, lockedDoorExit); |
128 | 128 | ||
129 | this.d(Room.SECRET_CORRIDOR_END, Direction.EAST, new TransporterDoor(Room.values())); | 129 | this.d(Room.SECRET_CORRIDOR_END, Direction.EAST, new Door(Room.TRANSPORTER_ROOM)); |
130 | this.d(Room.TRANSPORTER_ROOM, Direction.WEST, new TransporterDoor(Room.values())); | ||
130 | } | 131 | } |
131 | 132 | ||
132 | /** | 133 | /** |
diff --git a/src/esieequest/model/map/Room.java b/src/esieequest/model/map/Room.java index 5444496..e95b851 100644 --- a/src/esieequest/model/map/Room.java +++ b/src/esieequest/model/map/Room.java | |||
@@ -65,7 +65,10 @@ public enum Room implements SerialisableObject { | |||
65 | STORAGE_ROOM("in a storage room"), | 65 | STORAGE_ROOM("in a storage room"), |
66 | SECRET_LAB("in a secret lab"), | 66 | SECRET_LAB("in a secret lab"), |
67 | DEAD_END("in a dead end"), | 67 | DEAD_END("in a dead end"), |
68 | LOCKED_ROOM("in a locked room"); | 68 | LOCKED_ROOM("in a locked room"), |
69 | TRANSPORTER_ROOM("in a teleporter"), | ||
70 | |||
71 | ; | ||
69 | 72 | ||
70 | // @formatter:on | 73 | // @formatter:on |
71 | 74 | ||