|
@ -29,10 +29,7 @@ public class Program { |
|
|
boolean running = true; |
|
|
boolean running = true; |
|
|
|
|
|
|
|
|
while(running) { |
|
|
while(running) { |
|
|
for (char inputChar : input.inputList) { |
|
|
|
|
|
gameManager.ProcessInput(inputChar); |
|
|
|
|
|
} |
|
|
|
|
|
input.inputList.clear(); |
|
|
|
|
|
|
|
|
ForwardInputToGameManager(); |
|
|
|
|
|
|
|
|
gameManager.Update(); |
|
|
gameManager.Update(); |
|
|
|
|
|
|
|
@ -44,6 +41,13 @@ public class Program { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void ForwardInputToGameManager() { |
|
|
|
|
|
for (char inputChar : input.inputList) { |
|
|
|
|
|
gameManager.ProcessInput(inputChar); |
|
|
|
|
|
} |
|
|
|
|
|
input.inputList.clear(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public void CreateAndShowGUI() { |
|
|
public void CreateAndShowGUI() { |
|
|
frame = new JFrame("PacmaaaAAAYYYHAAAaaam"); |
|
|
frame = new JFrame("PacmaaaAAAYYYHAAAaaam"); |
|
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); |
|
|