diff --git a/src/main/java/Snake/Window.java b/src/main/java/Snake/Window.java index 21bb54f..c7380ac 100644 --- a/src/main/java/Snake/Window.java +++ b/src/main/java/Snake/Window.java @@ -2,6 +2,7 @@ package Snake; import javax.swing.*; import java.awt.*; +import java.awt.event.ActionListener; public class Window extends JFrame { @@ -41,5 +42,19 @@ public class Window extends JFrame setVisible(true); } + public GameView getGameView() + { + return gameView; + } + + public void addStartActionListener(ActionListener listener) + { + startBtn.addActionListener(listener); + } + public void addPauseActionListener(ActionListener listener) + { + pauseBtn.addActionListener(listener); + } } +