From 33c9d9103d199e66faccb3b24de63b6613f55b6b Mon Sep 17 00:00:00 2001 From: Justin Senn Date: Mon, 6 Feb 2023 17:54:12 +0100 Subject: [PATCH] update --- src/main/java/Snake/GameView.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/Snake/GameView.java b/src/main/java/Snake/GameView.java index ebd8c71..2310051 100644 --- a/src/main/java/Snake/GameView.java +++ b/src/main/java/Snake/GameView.java @@ -21,5 +21,15 @@ public class GameView extends JPanel this.gridSize = gridSize; } + @Override + protected void paintComponent(Graphics g) { + super.paintComponent(g); + for(var view : views) + { + view.draw(g); + } + + Toolkit.getDefaultToolkit().sync(); + } }