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(); + } }