@@ -0,0 +1,939 @@
+import javax.swing.JFrame;%0A%0Aimport java.awt.Color;%0Aimport java.awt.Graphics;%0Aimport java.awt.image.BufferedImage;%0Aimport java.util.ArrayList;%0A%0Apublic class Gui extends JFrame%7B%0A%09ArrayList%3CEntity%3E drawables = new ArrayList%3CEntity%3E();%0A%09GameApp ga;%0A%09public int offx = 0, offy = 0;%0A%09BufferedImage doubleBuffer = new BufferedImage(800, 600, BufferedImage.TYPE_3BYTE_BGR);%0A%09Graphics bg = doubleBuffer.getGraphics();%0A%09public Gui(GameApp ga)%7B%0A%09%09this.ga = ga;%0A%09%09this.drawables = ga.drawables;%0A%09%09addKeyListener(ga);%0A%09%09setDefaultCloseOperation(EXIT_ON_CLOSE);%0A%09%09setSize(100, 100);%0A%09%09setBackground(Color.BLACK);%0A%09%09setVisible(true);%0A%09%09setSize(800 + getInsets().left + getInsets().right, 600 + getInsets().top + getInsets().bottom);%0A%09%09%0A%09%7D%0A%09public void paint(Graphics g)%7B%0A%09%09bg.clearRect(0, 0, getWidth(), getHeight());%0A%09%09for(Entity e:drawables)%7B%0A%09%09%09e.draw(bg, offx, offy);%0A%09%09%7D%0A%09%09%0A%09%09g.drawImage(doubleBuffer, getInsets().left, getInsets().top, null);%0A%09%7D%0A%7D%0A

Create GameApp.java