diff --git a/src/main/java/org/bitbiome/commands/UseCommand.java b/src/main/java/org/bitbiome/commands/UseCommand.java index cdef2f5..fe57e5c 100644 --- a/src/main/java/org/bitbiome/commands/UseCommand.java +++ b/src/main/java/org/bitbiome/commands/UseCommand.java @@ -16,7 +16,12 @@ private boolean combat = false; getEnemies(player.getLocation().getMobList()); System.out.println(use(scanner, engine)); while(enemies.size() > 0 && combat) { - if(player.getHp() <= 0) + combat(player, scanner, engine); + } + } + + public void combat(Player player, Scanner scanner, TravelEngine engine) { + if(player.getHp() <= 0) System.exit(0); for(int i = 0; i