Browse Source

refactoring: removed empty lines

main
fdai7012 11 months ago
parent
commit
d135223e2c
  1. 12
      src/main/java/pacmanGame/Program.java

12
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);
}

Loading…
Cancel
Save