Browse Source

Merge branch 'develop' into locations

remotes/origin/map
Tanja Herche 2 years ago
parent
commit
0116cce4d4
  1. 3
      src/main/java/org/bitbiome/classes/InteractionLoop.java
  2. 2
      src/main/java/org/bitbiome/classes/JsonParser.java
  3. 4
      src/main/java/org/bitbiome/commands/HelpCommand.java
  4. 2
      src/main/java/org/bitbiome/commands/TravelCommand.java
  5. 2
      src/main/java/org/bitbiome/entities/Player.java
  6. 2
      src/test/java/org/bitbiome/commands/HelpCommandTest.java

3
src/main/java/org/bitbiome/classes/InteractionLoop.java

@ -4,6 +4,7 @@ import org.bitbiome.Boot;
import org.json.JSONObject; import org.json.JSONObject;
import java.util.Scanner; import java.util.Scanner;
public class InteractionLoop { public class InteractionLoop {
Scanner input = new Scanner(System.in); Scanner input = new Scanner(System.in);
@ -23,7 +24,7 @@ public class InteractionLoop {
while (isRunning) { while (isRunning) {
String line = input.nextLine().toLowerCase(); String line = input.nextLine().toLowerCase();
if (!Boot.instance.getCmdListener().perform(line.toLowerCase().split(" ")[0], input, isRunning, line, travelEngine)) { if (!Boot.instance.getCmdListener().perform(line.toLowerCase().split(" ")[0], input, isRunning, line, travelEngine)) {
System.out.println("Unknown Command");
System.out.println(Colors.ANSI_RED + "Unbekannter Befehl - Siehe " + Colors.ANSI_PURPLE + "help\n" + Colors.ANSI_RESET);
} }
} }
} }

2
src/main/java/org/bitbiome/classes/JsonParser.java

@ -2,12 +2,10 @@ package org.bitbiome.classes;
import org.json.JSONObject; import org.json.JSONObject;
import org.json.JSONTokener; import org.json.JSONTokener;
import org.json.JSONWriter;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.StringWriter;

4
src/main/java/org/bitbiome/commands/HelpCommand.java

@ -1,10 +1,10 @@
package org.bitbiome.commands; package org.bitbiome.commands;
import org.bitbiome.Boot;
import org.bitbiome.classes.Colors; import org.bitbiome.classes.Colors;
import org.bitbiome.classes.TravelEngine; import org.bitbiome.classes.TravelEngine;
import java.util.HashMap;
import java.util.Scanner; import java.util.Scanner;
public class HelpCommand implements CommandAPI { public class HelpCommand implements CommandAPI {

2
src/main/java/org/bitbiome/commands/TravelCommand.java

@ -1,7 +1,7 @@
package org.bitbiome.commands; package org.bitbiome.commands;
import org.bitbiome.classes.Colors; import org.bitbiome.classes.Colors;
import org.bitbiome.classes.CreateLocations;
import org.bitbiome.classes.TravelEngine; import org.bitbiome.classes.TravelEngine;
import org.bitbiome.entities.Item; import org.bitbiome.entities.Item;
import org.bitbiome.entities.Location; import org.bitbiome.entities.Location;

2
src/main/java/org/bitbiome/entities/Player.java

@ -1,6 +1,6 @@
package org.bitbiome.entities; package org.bitbiome.entities;
import org.bitbiome.classes.CreateLocations;
import org.bitbiome.classes.JsonParser; import org.bitbiome.classes.JsonParser;
import java.util.ArrayList; import java.util.ArrayList;

2
src/test/java/org/bitbiome/commands/HelpCommandTest.java

@ -3,7 +3,7 @@ package org.bitbiome.commands;
import org.bitbiome.classes.Colors; import org.bitbiome.classes.Colors;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class HelpCommandTest { public class HelpCommandTest {

Loading…
Cancel
Save