From 989a6148293d1a09e46732c3933f6bb53177ed0f Mon Sep 17 00:00:00 2001 From: Justin Senn Date: Mon, 6 Feb 2023 17:51:06 +0100 Subject: [PATCH] update --- src/main/java/Snake/GameView.java | 25 +++++++++++++++++++++++++ src/main/java/Snake/Window.java | 8 ++++++++ 2 files changed, 33 insertions(+) create mode 100644 src/main/java/Snake/GameView.java create mode 100644 src/main/java/Snake/Window.java diff --git a/src/main/java/Snake/GameView.java b/src/main/java/Snake/GameView.java new file mode 100644 index 0000000..ebd8c71 --- /dev/null +++ b/src/main/java/Snake/GameView.java @@ -0,0 +1,25 @@ +package Snake; + +import javax.swing.*; +import java.awt.*; +import java.util.ArrayList; + +public class GameView extends JPanel +{ + private final int gridSize; + + private ArrayList views; + + public GameView(int viewSize, int gridSize) + { + super(); + setPreferredSize(new Dimension(viewSize, viewSize)); + setDoubleBuffered(true); + setBackground(Color.BLACK); + + views = new ArrayList<>(); + this.gridSize = gridSize; + } + + +} diff --git a/src/main/java/Snake/Window.java b/src/main/java/Snake/Window.java new file mode 100644 index 0000000..01166e2 --- /dev/null +++ b/src/main/java/Snake/Window.java @@ -0,0 +1,8 @@ +package Snake; + +import javax.swing.*; + +public class Window extends JFrame +{ + +}