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