From 0de3c01e11ada1f691108a35b81cb69e1b5dab2c Mon Sep 17 00:00:00 2001 From: fdai7430 Date: Sat, 4 Feb 2023 18:07:36 +0100 Subject: [PATCH] Added combat loop --- src/main/java/org/bitbiome/commands/UseCommand.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/org/bitbiome/commands/UseCommand.java b/src/main/java/org/bitbiome/commands/UseCommand.java index 25684a4..2fcda38 100644 --- a/src/main/java/org/bitbiome/commands/UseCommand.java +++ b/src/main/java/org/bitbiome/commands/UseCommand.java @@ -31,6 +31,18 @@ private boolean combat = false; player.setHp(hp); } //TODO get input from player + do { + System.out.println("What do you want to do?"); + String input = scanner.nextLine(); + switch(input) { + case "use": + use(scanner, engine); + break; + default: + System.out.println("That is not a valid command."); + break; + } + } while(true); } }