From 7b7f81ec650c90ef5ece94fa0c82676c25dde275 Mon Sep 17 00:00:00 2001 From: David Hermann Date: Wed, 4 Jan 2023 02:41:01 +0100 Subject: [PATCH] Created the game engine An endless loop where a scanner scans the next line after one action and print it. --- .../java/org/bitbiome/InteractionLoop.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/java/org/bitbiome/InteractionLoop.java diff --git a/src/main/java/org/bitbiome/InteractionLoop.java b/src/main/java/org/bitbiome/InteractionLoop.java new file mode 100644 index 0000000..557585f --- /dev/null +++ b/src/main/java/org/bitbiome/InteractionLoop.java @@ -0,0 +1,19 @@ +package org.bitbiome; + +import java.util.Scanner; + +public class InteractionLoop { + + Scanner input = new Scanner(System.in); + + public void run() { + boolean isRunning = true; + while (isRunning) { + String line = input.nextLine().toLowerCase(); + System.out.println(line); + } + } + + + +}