diff --git a/src/main/java/com/comandante/creeper/Main.java b/src/main/java/com/comandante/creeper/Main.java index 5aa03aadc811e7724540ffa7774b1000dd359395..1778a768aa193cc33a1e597c91d4e421e9b97e4f 100644 --- a/src/main/java/com/comandante/creeper/Main.java +++ b/src/main/java/com/comandante/creeper/Main.java @@ -22,16 +22,16 @@ import java.io.File; public class Main { public static void main(String[] args) throws Exception { - Room lobby = new Room(1, Optional.of(2), Optional.<Integer>absent(), Optional.<Integer>absent(), Optional.<Integer>absent(), - "This is the lobby. It's pretty empty and the paint still smells fresh."); - Room hallway = new Room(2, Optional.of(3), Optional.<Integer>absent(), Optional.<Integer>absent(), Optional.of(1), - "This is the hallway. It's long and hallway-ish with exposed wires and floorboards showing."); - Room intake = new Room(3, Optional.<Integer>absent(), Optional.of(6), Optional.<Integer>absent(), Optional.of(2), - "This is the intake area. People are lined up like cattle waiting to be prodded."); - Room janitorialCloset = new Room(6, Optional.<Integer>absent(), Optional.<Integer>absent(), Optional.of(3), Optional.of(7), - "You find yourself in the janitorial closet. It smells like bleach."); - Room toilet = new Room(7, Optional.of(6), Optional.<Integer>absent(), Optional.<Integer>absent(), Optional.<Integer>absent(), - "You find yourself in the toilet. The smell is horrible."); + Room lobby = new Room(1, "Lobby", Optional.of(2), Optional.<Integer>absent(), Optional.<Integer>absent(), Optional.<Integer>absent(), + "This is the lobby. It's pretty empty and the paint still smells fresh.\r\n"); + Room hallway = new Room(2,"Hallway", Optional.of(3), Optional.<Integer>absent(), Optional.<Integer>absent(), Optional.of(1), + "This is the hallway. It's long and hallway-ish with exposed wires and floorboards showing.\r\n"); + Room intake = new Room(3, "Intake", Optional.<Integer>absent(), Optional.of(6), Optional.<Integer>absent(), Optional.of(2), + "This is the intake area. People are lined up like cattle waiting to be prodded.\r\n"); + Room janitorialCloset = new Room(6, "Closet", Optional.<Integer>absent(), Optional.<Integer>absent(), Optional.of(3), Optional.of(7), + "You find yourself in the janitorial closet. It smells like bleach.\r\n"); + Room toilet = new Room(7, "Toilet", Optional.of(6), Optional.<Integer>absent(), Optional.<Integer>absent(), Optional.<Integer>absent(), + "You find yourself in the toilet. The smell is horrible.\r\n"); RoomManager roomManager = new RoomManager(); roomManager.addRoom(lobby); diff --git a/src/main/java/com/comandante/creeper/managers/GameManager.java b/src/main/java/com/comandante/creeper/managers/GameManager.java index 281b6b616798c58c2fc89d7242da7477edaa29a1..f589e14c320728811c868384f0168fec7ab53d36 100644 --- a/src/main/java/com/comandante/creeper/managers/GameManager.java +++ b/src/main/java/com/comandante/creeper/managers/GameManager.java @@ -217,7 +217,7 @@ public class GameManager { private String getExits(Room room) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("[ Exits: "); - stringBuilder.append(new Ansi().fg(Ansi.Color.BLUE).toString()); + stringBuilder.append(new Ansi().fg(Ansi.Color.GREEN).toString()); if (room.getNorthId().isPresent()) { stringBuilder.append("North "); } @@ -238,6 +238,10 @@ public class GameManager { Player player = playerManager.getPlayer(playerId); final Room playerCurrentRoom = getPlayerCurrentRoom(player).get(); StringBuilder sb = new StringBuilder(); + sb.append("\r\n"); + sb.append(new Ansi().fg(Ansi.Color.GREEN).toString()); + sb.append(playerCurrentRoom.getRoomTitle()).append("\r\n\r\n"); + sb.append(new Ansi().reset().toString()); sb.append(playerCurrentRoom.getRoomDescription()).append("\r\n"); sb.append(getExits(playerCurrentRoom)); for (String searchPlayerId : playerCurrentRoom.getPresentPlayerIds()) { diff --git a/src/main/java/com/comandante/creeper/model/Room.java b/src/main/java/com/comandante/creeper/model/Room.java index 3787b8b322bfa33d93c7ec82b6e29ceab2646d85..1d2481a18a66f9a8ff62df3811522ddc3f1eed80 100644 --- a/src/main/java/com/comandante/creeper/model/Room.java +++ b/src/main/java/com/comandante/creeper/model/Room.java @@ -70,7 +70,7 @@ public class Room { } public String getRoomDescription() { - return new Ansi().fg(Ansi.Color.GREEN).render(roomDescription).toString() + new Ansi().reset().toString(); + return roomDescription; } public Integer getRoomId() {