Example #1
0
 private static void loadRoom() {
   currentRoom = roomsTable.get(CartesianPoint.keyCreator());
   if (!(currentRoom instanceof Room)) {
     currentRoom = xml.loadRoom();
     roomsTable.put(CartesianPoint.keyCreator(), currentRoom);
   }
   GameGUI.addToConsole(currentRoom.getFullRoomDescription());
 }
Example #2
0
  public static void movePlayerWest() {
    if (!xml.roomWestDescript().equals("an invisible wall")) {
      Door currentRoomDoor = currentRoom.getRoomDoor();
      if (currentRoom.containsLockedDoor()
          && currentRoomDoor.getDirection().equalsIgnoreCase("west")) {

        GameGUI.addToConsole("You run head first into a " + currentRoomDoor.getName());
      } else {
        CartesianPoint.x--;
        loadRoom();
      }
    } else
      GameGUI.addToConsole("You run head first into an invisible wall. You remain the same room.");
  }
Example #3
0
 public static String getEastDescript() {
   return xml.roomEastDescript();
 }
Example #4
0
 public static String getWestDescript() {
   return xml.roomWestDescript();
 }
Example #5
0
 public static String getSouthDescript() {
   return xml.roomSouthDescript();
 }
Example #6
0
 public static String getNorthDescript() {
   return xml.roomNorthDescript();
 }