@Override
    public void draw(Graphics2D g) {

        if (!data.death && !data.WIN) {
            g.setColor(Color.BLACK);
            //Draw the maze
            g.drawImage(data.levels[curLevel].back, 0, 0, null);

            //Draw the powers up
            for (int i = 0; i < data.powers.size(); ++i) {
                g.drawImage(data.powers.get(i).sprite.getSubimage(frame * 30, 0, 28, 28),
                        data.powers.get(i).pos.x * 2 - 14, data.powers.get(i).pos.y * 2 - 14, null);
            }
            //Draw the humans
            for (int i = 0; i < data.humans.size(); ++i) {
                g.drawImage(data.humans.get(i).sprite.getSubimage((frame / 2) * 30, (data.humans.get(i).curDir - 37) * 30, 28, 28),
                        data.humans.get(i).pos.x * 2 - 14, data.humans.get(i).pos.y * 2 - 14, null);
            }

            //Draw the soldiers
            for (int i = 0; i < data.soldiers.size(); ++i) {
                g.drawImage(data.soldiers.get(i).sprite.getSubimage((frame / 2) * 30, (data.soldiers.get(i).curDir - 37) * 30, 28, 28),
                        data.soldiers.get(i).pos.x * 2 - 14, data.soldiers.get(i).pos.y * 2 - 14, null);
            }

            //Draw the pacman
            g.drawImage(data.zombie.sprite.getSubimage((frame / 2) * 30, (curDir - 37) * 30, 28, 28),
                    data.zombie.pos.x * 2 - 14, data.zombie.pos.y * 2 - 14, null);

            if (!START) {
                g.drawImage(data.start, 0, 0, null);
            }
            if (PAUSE) {
                g.drawImage(data.pause, 0, 0, null);
            }
        }

        if (data.WIN) {
            g.drawImage(data.victory, 0, 0, null);
            end = true;
        }
        if (data.death) {
            g.drawImage(data.lost, 0, 0, null);
            end = true;
        }
    }