import java.awt.*; import java.awt.image.BufferedImage; public class SingleTile extends Tile { public BufferedImage tileImage; public SingleTile(int x, int y, BufferedImage tileImage) throws SpriteException { super(x, y); if (tileImage.getWidth() != tileImage.getHeight()) { throw new SpriteException(); } this.tileImage = tileImage; } public void draw(Graphics g){ g.drawImage(tileImage, x-GamePanel.camera.x, y, length, length, null); } }