From d135223e2cd8bdf50a278916e53dd0e449b250d4 Mon Sep 17 00:00:00 2001 From: fdai7012 Date: Thu, 8 Feb 2024 02:18:03 +0100 Subject: [PATCH] refactoring: removed empty lines --- src/main/java/pacmanGame/Program.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/main/java/pacmanGame/Program.java b/src/main/java/pacmanGame/Program.java index 1527638..383978e 100644 --- a/src/main/java/pacmanGame/Program.java +++ b/src/main/java/pacmanGame/Program.java @@ -17,24 +17,17 @@ public class Program { } public void StartGame() { - CreateAndShowGUI(); gameManager = new GameManager(); - GameLoop(); - } public void GameLoop() { boolean running = true; - while(running) { ForwardInputToGameManager(); - gameManager.Update(); - textArea.setText((String)gameManager.visualizer.GetOutput()); - try { Thread.sleep(100); } catch (InterruptedException e) {} @@ -53,22 +46,17 @@ public class Program { public void CreateAndShowGUI() { frame = new JFrame("PacmaaaAAAYYYHAAAaaam"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - frame.setSize(750, 950); - textArea = new JTextArea("..."); textArea.setEditable(false); textArea.setFocusable(false); textArea.setBackground(Color.black); textArea.setForeground(Color.yellow); - Font font = new Font("Consolas", Font.PLAIN, 10); textArea.setFont(font); - frame.add(textArea, BorderLayout.CENTER); frame.setLocationRelativeTo(null); frame.setVisible(true); - input = new MyKeyListener(); frame.addKeyListener(input); }