From 02ff696e341199e97d79442e3fd86a2baea1ff3c Mon Sep 17 00:00:00 2001 From: Benoît LUBRANO DI SBARAGLIONE Date: Tue, 11 Feb 2014 20:38:52 +0100 Subject: Add exits location. --- src/esieequest/Game.java | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/esieequest/Game.java b/src/esieequest/Game.java index 059fb8a..263244b 100644 --- a/src/esieequest/Game.java +++ b/src/esieequest/Game.java @@ -4,7 +4,7 @@ package esieequest; * Moteur du jeu. * * @author Pacien TRAN-GIRARD and Benoit LUBRANO DI SBARAGLIONE - * @version Février 2014 + * @version Février 2014 */ public class Game { @@ -36,7 +36,7 @@ public class Game private void createRooms() { - // création des lieux + // création des lieux Room vAmphitheaterSeat = new Room("in the amphitheater"); Room vAmphitheaterStage = new Room("on the amphitheater stage"); @@ -63,7 +63,30 @@ public class Game Room vOffice = new Room("in the office number 3254"); // positionnement des sorties (N,S,E,W) - // TODO + vAmphitheaterSeat.setExits(vAmphitheaterFront, vAmphitheaterFront, null, null); + vAmphitheaterStage.setExits(null, null, vAmphitheaterEntrance, vCafeteria); + vAmphitheaterEntrance.setExits(vAmphitheaterFront, null, null, vAmphitheaterStage); + vAmphitheaterFront.setExits(null, vAmphitheaterEntrance, vStreetEsieespace, vCafeteriaFront); + vCafeteria.setExits(vCafeteriaFront, null, vAmphitheaterStage, null); + vCafeteriaFront.setExits(null, vCafeteria, vAmphitheaterFront, vStudentsUnionFront); + vStudentsUnionFront.setExits(null, vStudentsUnion, vCafeteriaFront, null); + vStudentsUnion.setExits(vStudentsUnionFront, null, null, null); + vStreetEsieespace.setExits(null, vEsieespaceEntrance, null, null); + vEsieespaceEntrance.setExits(vStreetEsieespace, null, vEsieespace, null); + vEsieespace.setExits(null, null, null, vEsieespaceEntrance); + vReception.setExits(null, vEntranceStairs, vWingFront, vStreetEsieespace); + vEntranceStairs.setExits(vReception, vRoundabout, null, null); + vRoundabout.setExits(vEntranceStairs, null, null, null); + vWingFront.setExits(vCorridorOne, null, null, vReception); + vCorridorOne.setExits(null, vWingFront, vWcOne, vStairsOne); + vStairsOne.setExits(vStairsTwo, null, vCorridorOne, null); + vStairsTwo.setExits(null, vStairsOne, vCorridorTwo, null); + vCorridorTwo.setExits(vCorridorTwoOffice, null, vWcTwo, vStairsTwo); + vWcOne.setExits(null, null, null, null); + vWcTwo.setExits(null, null, null, vCorridorTwo); + vCorridorTwoOffice.setExits(null, vCorridorTwo, vOffice, null); + vOffice.setExits(null, null, null, vCorridorTwoOffice); + // initialisation du lieu courant this.aCurrentRoom = vAmphitheaterSeat; -- cgit v1.2.3