From 0756853d98f63ea140cee1e6765984bd4f3a7041 Mon Sep 17 00:00:00 2001 From: Justin Senn Date: Mon, 6 Feb 2023 18:02:02 +0100 Subject: [PATCH] update --- src/main/java/Snake/Window.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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); + } } +