From f9a4bef143e49964edae0cd70232c55f3996d16f Mon Sep 17 00:00:00 2001 From: Juliakn66 <117075450+Juliakn66@users.noreply.github.com> Date: Fri, 3 Feb 2023 16:03:04 +0100 Subject: [PATCH] added lookaroundCommand to helpCommand and helpCommandTest --- .../org/bitbiome/commands/HelpCommand.java | 29 ++++++++++--------- .../bitbiome/commands/HelpCommandTest.java | 29 ++++++++++--------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/src/main/java/org/bitbiome/commands/HelpCommand.java b/src/main/java/org/bitbiome/commands/HelpCommand.java index ce839b0..2f9a5ac 100644 --- a/src/main/java/org/bitbiome/commands/HelpCommand.java +++ b/src/main/java/org/bitbiome/commands/HelpCommand.java @@ -18,19 +18,22 @@ public class HelpCommand implements CommandAPI { public static String getHelpMessage() { StringBuilder outputMessage = new StringBuilder(); outputMessage - .append("|______________|_____________________________|\n") - .append("|" + Colors.ANSI_PURPLE + " Command" + Colors.ANSI_RESET + " | " + Colors.ANSI_PURPLE + "Description" + Colors.ANSI_RESET + " |\n") - .append("|--------------|-----------------------------|\n") - .append("|" + Colors.ANSI_GREEN + " help" + Colors.ANSI_RESET + " | Gibt diese Nachricht aus |\n") - .append("|--------------|-----------------------------|\n") - .append("|" + Colors.ANSI_GREEN + " exit/quit" + Colors.ANSI_RESET + " | Beendet das Spiel |\n") - .append("|--------------|-----------------------------|\n") - .append("|" + Colors.ANSI_GREEN + " travel" + Colors.ANSI_RESET + " | Startet das Reise System |\n") - .append("|--------------|-----------------------------|\n") - .append("|" + Colors.ANSI_GREEN + " location" + Colors.ANSI_RESET + " | Gibt deine Location aus |\n") - .append("|______________|_____________________________|\n") - .append("|" + Colors.ANSI_GREEN + " inventory" + Colors.ANSI_RESET + " | Gibt dein Inventar aus |\n") - .append("|______________|_____________________________|\n"); + .append("|______________|_______________________________|\n") + .append("|" + Colors.ANSI_PURPLE + " Command" + Colors.ANSI_RESET + " | " + Colors.ANSI_PURPLE + "Description" + Colors.ANSI_RESET + " |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " help" + Colors.ANSI_RESET + " | Gibt diese Nachricht aus |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " exit/quit" + Colors.ANSI_RESET + " | Beendet das Spiel |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " travel" + Colors.ANSI_RESET + " | Startet das Reise System |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " location" + Colors.ANSI_RESET + " | Gibt deine Location aus |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " inventory" + Colors.ANSI_RESET + " | Gibt dein Inventar aus |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " lookaround" + Colors.ANSI_RESET + " | Zeigt dir deine Umgebung, |\n") + .append("|" + Colors.ANSI_GREEN + " " + Colors.ANSI_RESET + " | Items und Mobs in der Nähe |\n") + .append("|______________|_______________________________|\n"); return outputMessage.toString(); } diff --git a/src/test/java/org/bitbiome/commands/HelpCommandTest.java b/src/test/java/org/bitbiome/commands/HelpCommandTest.java index 14f9bcd..afdd7b2 100644 --- a/src/test/java/org/bitbiome/commands/HelpCommandTest.java +++ b/src/test/java/org/bitbiome/commands/HelpCommandTest.java @@ -12,19 +12,22 @@ public class HelpCommandTest { String helpMessage = HelpCommand.getHelpMessage(); StringBuilder outputMessage = new StringBuilder(); outputMessage - .append("|______________|_____________________________|\n") - .append("|" + Colors.ANSI_PURPLE + " Command" + Colors.ANSI_RESET + " | " + Colors.ANSI_PURPLE + "Description" + Colors.ANSI_RESET + " |\n") - .append("|--------------|-----------------------------|\n") - .append("|" + Colors.ANSI_GREEN + " help" + Colors.ANSI_RESET + " | Gibt diese Nachricht aus |\n") - .append("|--------------|-----------------------------|\n") - .append("|" + Colors.ANSI_GREEN + " exit/quit" + Colors.ANSI_RESET + " | Beendet das Spiel |\n") - .append("|--------------|-----------------------------|\n") - .append("|" + Colors.ANSI_GREEN + " travel" + Colors.ANSI_RESET + " | Startet das Reise System |\n") - .append("|--------------|-----------------------------|\n") - .append("|" + Colors.ANSI_GREEN + " location" + Colors.ANSI_RESET + " | Gibt deine Location aus |\n") - .append("|______________|_____________________________|\n") - .append("|" + Colors.ANSI_GREEN + " inventory" + Colors.ANSI_RESET + " | Gibt dein Inventar aus |\n") - .append("|______________|_____________________________|\n"); + .append("|______________|_______________________________|\n") + .append("|" + Colors.ANSI_PURPLE + " Command" + Colors.ANSI_RESET + " | " + Colors.ANSI_PURPLE + "Description" + Colors.ANSI_RESET + " |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " help" + Colors.ANSI_RESET + " | Gibt diese Nachricht aus |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " exit/quit" + Colors.ANSI_RESET + " | Beendet das Spiel |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " travel" + Colors.ANSI_RESET + " | Startet das Reise System |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " location" + Colors.ANSI_RESET + " | Gibt deine Location aus |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " inventory" + Colors.ANSI_RESET + " | Gibt dein Inventar aus |\n") + .append("|--------------|-------------------------------|\n") + .append("|" + Colors.ANSI_GREEN + " lookaround" + Colors.ANSI_RESET + " | Zeigt dir deine Umgebung, |\n") + .append("|" + Colors.ANSI_GREEN + " " + Colors.ANSI_RESET + " | Items und Mobs in der Nähe |\n") + .append("|______________|_______________________________|\n"); assertEquals(outputMessage.toString(), helpMessage); }