From e9cd16ec488e951ece912525ec766a1fed57a629 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sun, 18 May 2014 23:46:42 +0200 Subject: Move the TransporterDoor in a dedicated Room to comply with the exercise --- src/esieequest/model/Game.java | 3 ++- 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 { lockedDoorExit.setKey(Item.KEYCARD); this.d(Room.LOCKED_ROOM, Direction.NORTH, lockedDoorExit); - this.d(Room.SECRET_CORRIDOR_END, Direction.EAST, new TransporterDoor(Room.values())); + this.d(Room.SECRET_CORRIDOR_END, Direction.EAST, new Door(Room.TRANSPORTER_ROOM)); + this.d(Room.TRANSPORTER_ROOM, Direction.WEST, new TransporterDoor(Room.values())); } /** 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 { STORAGE_ROOM("in a storage room"), SECRET_LAB("in a secret lab"), DEAD_END("in a dead end"), - LOCKED_ROOM("in a locked room"); + LOCKED_ROOM("in a locked room"), + TRANSPORTER_ROOM("in a teleporter"), + + ; // @formatter:on -- cgit v1.2.3