Browse Source

Resource Leak fixed

remotes/origin/develop
David Hermann 2 years ago
parent
commit
ac7332a845
  1. 1
      src/main/java/org/bitbiome/classes/InteractionLoop.java
  2. 4
      src/main/java/org/bitbiome/commands/BlackJackCommand.java

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

@ -39,7 +39,6 @@ public class InteractionLoop {
+ "Oh, ein Fremder!\nBist du bereit für dein womöglich größtes Abenteuer?\nDann sag mir doch zunächst wie du heißt: "
+ Colors.ANSI_RESET);
String name = input.nextLine();
JsonParser jp = new JsonParser();
JSONObject playerconf = JsonParser.getJSONObject("src/main/resources/playerconfig.json");
playerconf.put("name", name);
travelEngine.getPlayer().setName(name);

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

@ -17,10 +17,10 @@ public class BlackJackCommand implements CommandAPI {
over = false;
spielen();
}
Scanner sc;
public void spielen() {
BlackJack bj = new BlackJack("Dave");
Scanner sc = new Scanner(System.in);
sc = new Scanner(System.in);
BlackJack.Entity player = bj.getEntity(1);
while (!over) {
int r = new Random().nextInt(4, 11);

Loading…
Cancel
Save