From 4145a5e8ce6cc4a7be3e51fcef71ca004b2ba463 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sun, 23 Feb 2014 17:10:01 +0100 Subject: Add a vertical direction --- src/esieequest/Game.java | 2 ++ src/esieequest/Room.java | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/esieequest/Game.java b/src/esieequest/Game.java index a0e0cd2..1be4d15 100644 --- a/src/esieequest/Game.java +++ b/src/esieequest/Game.java @@ -117,8 +117,10 @@ public class Game { vWingCorridorOne.setExit("south", vWingStreet); vWingCorridorOne.setExit("east", vOffscriptEat); vWingStairsOne.setExit("south", vWingStairsTwo); + vWingStairsOne.setExit("up", vWingStairsTwo); vWingStairsOne.setExit("east", vWingCorridorOne); vWingStairsTwo.setExit("south", vWingStairsOne); + vWingStairsTwo.setExit("down", vWingStairsOne); vWingStairsTwo.setExit("east", vWingCorridorTwo); vWingCorridorTwo.setExit("north", vWingCorridorTwoOffice); vWingCorridorTwoOffice.setExit("south", vWingCorridorTwo); diff --git a/src/esieequest/Room.java b/src/esieequest/Room.java index 780f76a..1b23afa 100644 --- a/src/esieequest/Room.java +++ b/src/esieequest/Room.java @@ -58,16 +58,22 @@ public class Room { public String getExitString() { String vExitsString = "Available exits:"; if (this.aExits.get("north") != null) { - vExitsString += " North"; + vExitsString += " north"; } if (this.aExits.get("south") != null) { - vExitsString += " South"; + vExitsString += " south"; } if (this.aExits.get("east") != null) { - vExitsString += " East"; + vExitsString += " east"; } if (this.aExits.get("west") != null) { - vExitsString += " West"; + vExitsString += " west"; + } + if (this.aExits.get("up") != null) { + vExitsString += " up"; + } + if (this.aExits.get("down") != null) { + vExitsString += " down"; } vExitsString += "."; return vExitsString; -- cgit v1.2.3