package clue;

public class RoomCell extends BoardCell {
	public static enum DoorDirection {UP, RIGHT, DOWN, LEFT, NONE};
	private DoorDirection doorDirection;
	private char roomInitial;

	public RoomCell(int i, int rows, int cols, String config) {
		super(i, rows, cols);
		doorDirection = DoorDirection.NONE;
		roomInitial = config.charAt(0);
		String roomSpec = config;

		if(roomSpec.length() > 1) { // Then we have a door.
			char door = roomSpec.charAt(1);
			if(door == 'U') doorDirection = DoorDirection.UP;
			else if(door == 'R') doorDirection = DoorDirection.RIGHT;
			else if(door == 'D') doorDirection = DoorDirection.DOWN;
			else if(door == 'L') doorDirection = DoorDirection.LEFT;
		}
	}

	public DoorDirection getDoorDirection() {
		return doorDirection;
	}

	public char getRoomInitial() {
		return roomInitial;
	}

	public boolean isRoom() {
		return true;
	}

	public boolean isDoorway() {
		if(this.doorDirection != DoorDirection.NONE) return true;
		else return false;
	}
}

@@ -266,16 +266,39 @@
  cols);%0A
+%09%09%0A%09%09// Door handling.%0A
 %09%09doorDi
@@ -389,17 +389,16 @@
 config;%0A
-%0A
 %09%09if(roo

Update RoomCell.java