From 2f05974c14777701ffd9a4bfb9be10d4fed6c5e4 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Fri, 21 Feb 2014 22:07:14 +0100 Subject: Modify rooms according to the new map --- src/esieequest/Game.java | 94 ++++++++++++++++++++++++++++-------------------- src/esieequest/Room.java | 2 +- 2 files changed, 56 insertions(+), 40 deletions(-) diff --git a/src/esieequest/Game.java b/src/esieequest/Game.java index a21c56a..3548b62 100644 --- a/src/esieequest/Game.java +++ b/src/esieequest/Game.java @@ -34,48 +34,64 @@ public class Game { // create rooms Room vAmphitheaterSeat = new Room("in the amphitheater"); Room vAmphitheaterStage = new Room("on the amphitheater stage"); - Room vAmphitheaterEntrance = new Room("at the amphitheater entrance"); - Room vAmphitheaterFront = new Room("in ESIEE main corridor, in front of the amphitheater"); - Room vCafeteria = new Room("in the cafeteria"); - Room vCafeteriaFront = new Room("in ESIEE main corridor, in front of the cafeteria"); - Room vStudentsUnionFront = new Room("in ESIEE main corridor, in front of the Students' Union"); - Room vStudentsUnion = new Room("in the Students' Union HQ"); - Room vStreetEsieespace = new Room("in ESIEE main corridor, in front of the ESIEEspace HQ"); + + Room vCafeteriaStreet = new Room("in the main corridor, in front of the cafeteria"); + Room vCafeteria = new Room("at the cafeteria"); + + Room vEsieespaceStreet = new Room("in the main corridor, in front of the ESIEEspace HQ"); + Room vEsieespaceFront = new Room("in front of the ESIEEspace HQ"); Room vEsieespaceEntrance = new Room("at the ESIEEspace HQ entrance"); Room vEsieespace = new Room("in the ESIEEspace HQ"); - Room vReception = new Room("in ESIEE main corridor, at the Reception"); - Room vEntranceStairs = new Room("at the entrance stairs"); - Room vRoundabout = new Room("at the roundabout"); - Room vWingFront = new Room("in font of wing 3"); - Room vCorridorOne = new Room("at the corridor 3, main floor"); - Room vStairsOne = new Room("in the stairwell at main floor"); - Room vStairsTwo = new Room("in the stairwell at second floor"); - Room vCorridorTwo = new Room("at the corridor 3, second floor"); - Room vCorridorTwoOffice = new Room("in front of the office at floor 2"); - Room vOffice = new Room("in the office number 3254 (corridor 3, floor 2, right side 5, room 4)"); - - // connect rooms (N, S, E, W) + + Room vClubnixStreet = new Room("in the main corridor, in front of the Club*Nix"); + Room vClubnixFront = new Room("in front of the Club*Nix"); + Room vClubnixEntrance = new Room("at the Club*Nix entrance"); + Room vClubnix = new Room("in the Club*Nix"); + + Room vEntranceStreet = new Room("in the main corridor, at the reception"); + Room vEntranceStairs = new Room("on the main entrance stairs"); + Room vEntranceRoundabout = new Room("on the roundabout"); + + Room vWingStreet = new Room("in font of wing #3"); + Room vWingCorridorOne = new Room("in the corridor in wing #3, on the ground floor"); + Room vWingStairsOne = new Room("in the stairwell on the ground floor"); + Room vWingStairsTwo = new Room("in the stairwell on the first floor"); + Room vWingCorridorTwo = new Room("in the corridor in wind #3, on the first floor"); + Room vWingCorridorTwoOffice = new Room("in front of the office #3254"); + Room vWingOffice = new Room("in the office #3254"); + + Room vOffscript = new Room("nowhere"); + + // connect rooms (N, W, S, E) vAmphitheaterSeat.setExits(vAmphitheaterStage, null, 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, vReception, vAmphitheaterFront); - 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, null, vStairsOne); - vStairsOne.setExits(null, vStairsTwo, vCorridorOne, null); - vStairsTwo.setExits(null, vStairsOne, vCorridorTwo, null); - vCorridorTwo.setExits(vCorridorTwoOffice, null, null, vStairsTwo); - vCorridorTwoOffice.setExits(null, vCorridorTwo, vOffice, null); - vOffice.setExits(null, null, null, vCorridorTwoOffice); + vAmphitheaterStage.setExits(null, vCafeteria, null, null); + + vCafeteriaStreet.setExits(null, null, vCafeteria, vEsieespaceStreet); + vCafeteria.setExits(vCafeteriaStreet, null, null, vAmphitheaterStage); + + vEsieespaceStreet.setExits(null, vCafeteria, vEsieespaceFront, vEntranceStreet); + vEsieespaceFront.setExits(vEsieespaceStreet, null, null, vEsieespaceEntrance); + vEsieespaceEntrance.setExits(vEsieespace, vEsieespaceFront, null, null); + vEsieespace.setExits(null, null, vEsieespaceEntrance, null); + + vClubnixStreet.setExits(null, vWingStreet, vClubnixFront, null); + vClubnixFront.setExits(vClubnixStreet, null, null, vClubnixEntrance); + vClubnixEntrance.setExits(vClubnix, vClubnixFront, null, null); + vClubnix.setExits(null, null, vClubnixEntrance, null); + + vEntranceStreet.setExits(null, vEsieespaceStreet, vEntranceStairs, vWingStreet); + vEntranceStairs.setExits(vEntranceStreet, null, vEntranceRoundabout, null); + vEntranceRoundabout.setExits(vEntranceStairs, null, null, null); + + vWingStreet.setExits(vWingCorridorOne, vEntranceStreet, null, vClubnixStreet); + vWingCorridorOne.setExits(null, vWingStairsOne, vWingStreet, vOffscript); + vWingStairsOne.setExits(null, null, vWingStairsTwo, vWingCorridorOne); + vWingStairsTwo.setExits(null, null, vWingStairsOne, vWingCorridorTwo); + vWingCorridorTwo.setExits(vWingCorridorTwoOffice, null, null, null); + vWingCorridorTwoOffice.setExits(null, null, vWingCorridorTwo, vWingOffice); + vWingOffice.setExits(null, vWingCorridorTwoOffice, null, null); + + vOffscript.setExits(null, vWingCorridorOne, null, null); // set the starting room this.aCurrentRoom = vAmphitheaterSeat; diff --git a/src/esieequest/Room.java b/src/esieequest/Room.java index b7a3339..0a16e33 100644 --- a/src/esieequest/Room.java +++ b/src/esieequest/Room.java @@ -27,7 +27,7 @@ public class Room { /** * Defines the four exits (other rooms) of this room. */ - public void setExits(final Room pNorthExit, final Room pSouthExit, final Room pEastExit, final Room pWestExit) { + public void setExits(final Room pNorthExit, final Room pWestExit, final Room pSouthExit, final Room pEastExit) { this.aNorthExit = pNorthExit; this.aSouthExit = pSouthExit; this.aEastExit = pEastExit; -- cgit v1.2.3