From 5f191f6ecf419bae1fdb4e4d426079320b45eecd Mon Sep 17 00:00:00 2001 From: fdai7012 Date: Wed, 17 Jan 2024 17:26:30 +0100 Subject: [PATCH] Added Keyboard Input routing to forward Input from Program to GameManager --- src/main/java/pacmanGame/Program.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/pacmanGame/Program.java b/src/main/java/pacmanGame/Program.java index cf62472..6352548 100644 --- a/src/main/java/pacmanGame/Program.java +++ b/src/main/java/pacmanGame/Program.java @@ -29,6 +29,11 @@ public class Program { boolean running = true; while(running) { + for (char inputChar : input.inputList) { + gameManager.ProcessInput(inputChar); + } + input.inputList.clear(); + gameManager.Update(); textArea.setText((String)gameManager.visualizer.GetOutput());