Commit 2e78266b authored by d0tslash's avatar d0tslash
Browse files

exit color and spacing

parent 177ec6b7
......@@ -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);
......
......@@ -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()) {
......
......@@ -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() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment