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()); }
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."); }
public static String getEastDescript() { return xml.roomEastDescript(); }
public static String getWestDescript() { return xml.roomWestDescript(); }
public static String getSouthDescript() { return xml.roomSouthDescript(); }
public static String getNorthDescript() { return xml.roomNorthDescript(); }