[
  {
    "path": "G.java",
    "content": "/**\n * Comment free (yay) source code for Left 4k Dead by Markus Persson\n * Please don't reuse any of this code in other projects.\n * http://www.mojang.com/notch/j4k/l4kd/\n */\nimport java.applet.Applet;\nimport java.awt.*;\nimport java.awt.event.*;\nimport java.awt.image.*;\nimport java.util.*;\n\npublic class G extends Applet implements Runnable\n{\n    private boolean[] k = new boolean[32767];\n    private int m;\n\n    public void start()\n    {\n        enableEvents(AWTEvent.KEY_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK);\n        new Thread(this).start();\n    }\n\n    public void run()\n    {\n        BufferedImage image = new BufferedImage(240, 240, BufferedImage.TYPE_INT_RGB);\n        Graphics ogr = image.getGraphics();\n\n        Random random = new Random();\n        int[] pixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();\n        int[] sprites = new int[18 * 4 * 16 * 12 * 12];\n        int pix = 0;\n        for (int i = 0; i < 18; i++)\n        {\n            int skin = 0xFF9993;\n            int clothes = 0xFFffff;\n\n            if (i > 0)\n            {\n                skin = 0xa0ff90;\n                clothes = (random.nextInt(0x1000000) & 0x7f7f7f);\n            }\n            for (int t = 0; t < 4; t++)\n            {\n                for (int d = 0; d < 16; d++)\n                {\n                    double dir = d * Math.PI * 2 / 16.0;\n\n                    if (t == 1) dir += 0.5 * Math.PI * 2 / 16.0;\n                    if (t == 3) dir -= 0.5 * Math.PI * 2 / 16.0;\n\n//                    if (i == 17)\n//                    {\n//                        dir = d * Math.PI * 2 / 64;\n                    //}\n\n                    double cos = Math.cos(dir);\n                    double sin = Math.sin(dir);\n\n                    for (int y = 0; y < 12; y++)\n                    {\n                        int col = 0x000000;\n                        for (int x = 0; x < 12; x++)\n                        {\n                            int xPix = (int) (cos * (x - 6) + sin * (y - 6) + 6.5);\n                            int yPix = (int) (cos * (y - 6) - sin * (x - 6) + 6.5);\n\n                            if (i == 17)\n                            {\n                                if (xPix > 3 && xPix < 9 && yPix > 3 && yPix < 9)\n                                {\n                                    col = 0xff0000 + (t & 1) * 0xff00;\n                                }\n                            }\n                            else\n                            {\n                                if (t == 1 && xPix > 1 && xPix < 4 && yPix > 3 && yPix < 8) col = skin;\n                                if (t == 3 && xPix > 8 && xPix < 11 && yPix > 3 && yPix < 8) col = skin;\n\n                                if (xPix > 1 && xPix < 11 && yPix > 5 && yPix < 8)\n                                {\n                                    col = clothes;\n                                }\n                                if (xPix > 4 && xPix < 8 && yPix > 4 && yPix < 8)\n                                {\n                                    col = skin;\n                                }\n                            }\n                            sprites[pix++] = col;\n                            if (col > 1)\n                            {\n                                col = 1;\n                            }\n                            else\n                            {\n                                col = 0;\n                            }\n                        }\n                    }\n                }\n            }\n        }\n\n        int score = 0;\n        int hurtTime = 0;\n        int bonusTime = 0;\n        int xWin0 = 0;\n        int yWin0 = 0;\n        int xWin1 = 0;\n        int yWin1 = 0;\n\n        restart: while (true)\n        {\n            boolean gameStarted = false;\n            int level = 0;\n            int shootDelay = 0;\n            int rushTime = 150;\n            int damage = 20;\n            int ammo = 20;\n            int clips = 20;\n\n            winLevel: while (true)\n            {\n                int tick = 0;\n                level++;\n                int[] map = new int[1024 * 1024];\n                random = new Random(4329+level);\n\n                int[] monsterData = new int[320 * 16];\n                {\n                    int i = 0;\n                    for (int y = 0; y < 1024; y++)\n                        for (int x = 0; x < 1024; x++)\n                        {\n                            int br = random.nextInt(32) + 112;\n                            map[i] = (br / 3) << 16 | (br) << 8;\n                            if (x < 4 || y < 4 || x >= 1020 || y >= 1020)\n                            {\n                                map[i] = 0xFFFEFE;\n                            }\n                            i++;\n                        }\n\n                    for (i = 0; i < 70; i++)\n                    {\n                        int w = random.nextInt(8) + 2;\n                        int h = random.nextInt(8) + 2;\n                        int xm = random.nextInt(64 - w - 2) + 1;\n                        int ym = random.nextInt(64 - h - 2) + 1;\n\n                        w *= 16;\n                        h *= 16;\n\n                        w += 5;\n                        h += 5;\n                        xm *= 16;\n                        ym *= 16;\n\n                        if (i==68)\n                        {\n                            monsterData[0] = xm+w/2;\n                            monsterData[1] = ym+h/2;\n                            monsterData[15] = 0x808080;\n                            monsterData[11] = 1; \n                        }\n                        \n                        xWin0 = xm+5;\n                        yWin0 = ym+5;\n                        xWin1 = xm + w-5;\n                        yWin1 = ym + h-5;\n                        for (int y = ym; y < ym + h; y++)\n                            for (int x = xm; x < xm + w; x++)\n                            {\n                                int d = x - xm;\n                                if (xm + w - x - 1 < d) d = xm + w - x - 1;\n                                if (y - ym < d) d = y - ym;\n                                if (ym + h - y - 1 < d) d = ym + h - y - 1;\n\n                                map[x + y * 1024] = 0xFF8052;\n                                if (d > 4)\n                                {\n                                    int br = random.nextInt(16) + 112;\n                                    if (((x + y) & 3) == 0)\n                                    {\n                                        br += 16;\n                                    }\n                                    map[x + y * 1024] = (br * 3 / 3) << 16 | (br * 4 / 4) << 8 | (br * 4 / 4);\n                                }\n                                if (i == 69)\n                                {\n                                    map[x + y * 1024] &= 0xff0000;\n                                }\n                            }\n\n                        for (int j = 0; j < 2; j++)\n                        {\n                            int xGap = random.nextInt(w - 24) + xm + 5;\n                            int yGap = random.nextInt(h - 24) + ym + 5;\n                            int ww = 5;\n                            int hh = 5;\n\n                            xGap = xGap / 16 * 16 + 5;\n                            yGap = yGap / 16 * 16 + 5;\n                            if (random.nextInt(2) == 0)\n                            {\n                                xGap = xm + (w - 5) * random.nextInt(2);\n                                hh = 11;\n                            }\n                            else\n                            {\n                                ww = 11;\n                                yGap = ym + (h - 5) * random.nextInt(2);\n                            }\n                            for (int y = yGap; y < yGap + hh; y++)\n                                for (int x = xGap; x < xGap + ww; x++)\n                                {\n                                    int br = random.nextInt(32) + 112 - 64;\n                                    map[x + y * 1024] = (br * 3 / 3) << 16 | (br * 4 / 4) << 8 | (br * 4 / 4);\n                                }\n                        }\n                    }\n\n                    for (int y = 1; y < 1024 - 1; y++)\n                        inloop: for (int x = 1; x < 1024 - 1; x++)\n                        {\n                            for (int xx = x - 1; xx <= x + 1; xx++)\n                                for (int yy = y - 1; yy <= y + 1; yy++)\n                                    if (map[xx + yy * 1024] < 0xff0000) continue inloop;\n\n                            map[x + y * 1024] = 0xffffff;\n                        }\n                }\n\n                long lastTime = System.nanoTime();\n\n                int[] lightmap = new int[240 * 240];\n                int[] brightness = new int[512];\n\n                double offs = 30;\n                double playerDir = 0;\n                for (int i = 0; i < 512; i++)\n                {\n                    brightness[i] = (int) (255.0 * offs / (i + offs));\n                    if (i < 4) brightness[i] = brightness[i] * i / 4;\n                }\n\n                Graphics sg = getGraphics();\n                random = new Random();\n                while (true)\n                {\n                    if (gameStarted)\n                    {\n                        tick++;\n                        rushTime++;\n\n                        if (rushTime >= 150)\n                        {\n                            rushTime = -random.nextInt(2000);\n                        }\n                        // Move player:\n                        int mouse = m;\n                        playerDir = Math.atan2(mouse / 240 - 120, mouse % 240 - 120);\n\n                        double shootDir = playerDir + (random.nextInt(100) - random.nextInt(100)) / 100.0 * 0.2;\n                        double cos = Math.cos(-shootDir);\n                        double sin = Math.sin(-shootDir);\n\n                        int xCam = monsterData[0];\n                        int yCam = monsterData[1];\n\n                        for (int i = 0; i < 960; i++)\n                        {\n                            int xt = i % 240 - 120;\n                            int yt = (i / 240 % 2) * 239 - 120;\n\n                            if (i >= 480)\n                            {\n                                int tmp = xt;\n                                xt = yt;\n                                yt = tmp;\n                            }\n\n                            double dd = Math.atan2(yt, xt) - playerDir;\n                            if (dd < -Math.PI) dd += Math.PI * 2;\n                            if (dd >= Math.PI) dd -= Math.PI * 2;\n\n                            int brr = (int) ((1 - dd * dd) * 255);\n\n                            int dist = 120;\n                            if (brr < 0)\n                            {\n                                brr = 0;\n                                dist = 32;\n                            }\n                            if (tick < 60) brr = brr * tick / 60;\n\n                            int j = 0;\n                            for (; j < dist; j++)\n                            {\n                                int xx = xt * j / 120 + 120;\n                                int yy = yt * j / 120 + 120;\n                                int xm = xx + xCam - 120;\n                                int ym = yy + yCam - 120;\n\n                                if (map[(xm + ym * 1024) & (1024 * 1024 - 1)] == 0xffffff) break;\n\n                                int xd = (xx - 120) * 256 / 120;\n                                int yd = (yy - 120) * 256 / 120;\n\n                                int ddd = (xd * xd + yd * yd) / 256;\n                                int br = brightness[ddd] * brr / 255;\n\n                                if (ddd < 16)\n                                {\n                                    int tmp = 128 * (16 - ddd) / 16;\n                                    br = br + tmp * (255 - br) / 255;\n                                }\n\n                                lightmap[xx + yy * 240] = br;\n                            }\n                        }\n                        for (int y = 0; y < 240; y++)\n                        {\n                            int xm = xCam - 120;\n                            int ym = y + yCam - 120;\n                            for (int x = 0; x < 240; x++)\n                            {\n                                pixels[x + y * 240] = map[(xm + x + ym * 1024) & (1024 * 1024 - 1)];\n                            }\n                        }\n\n                        int closestHitDist = 0;\n                        for (int j = 0; j < 250; j++)\n                        {\n                            int xm = xCam + (int) (cos * j / 2);\n                            int ym = yCam - (int) (sin * j / 2);\n                            if (map[(xm + ym * 1024) & (1024 * 1024 - 1)] == 0xffffff) break;\n                            closestHitDist = j / 2;\n                        }\n\n                        boolean shoot = shootDelay-- < 0 && k[1];\n\n                        {\n                            int closestHit = 0;\n\n                            nextMonster: for (int m = 0; m < 256 + 16; m++)\n                            {\n                                int xPos = monsterData[m * 16 + 0];\n                                int yPos = monsterData[m * 16 + 1];\n                                if (monsterData[m * 16 + 11] == 0)\n                                {\n                                    xPos = (random.nextInt(62) + 1) * 16 + 8;\n                                    yPos = (random.nextInt(62) + 1) * 16 + 8;\n\n                                    int xd = xCam - xPos;\n                                    int yd = yCam - yPos;\n\n                                    if (xd * xd + yd * yd < 180 * 180)\n                                    {\n                                        xPos = 1;\n                                        yPos = 1;\n                                    }\n\n                                    if (map[xPos + yPos * 1024] < 0xfffffe && (m <= 128 || rushTime > 0 || (m > 255 && tick == 1)))\n                                    {\n                                        monsterData[m * 16 + 0] = xPos;\n                                        monsterData[m * 16 + 1] = yPos;\n                                        monsterData[m * 16 + 15] = map[xPos + yPos * 1024];\n                                        map[xPos + yPos * 1024] = 0xfffffe;\n                                        monsterData[m * 16 + 9] = (rushTime > 0 || random.nextInt(3) == 0) ? 127 : 0;\n                                        monsterData[m * 16 + 11] = 1;\n                                        monsterData[m * 16 + 2] = m & 15;\n                                    }\n                                    else\n                                    {\n                                        continue;\n                                    }\n                                }\n                                else\n                                {\n                                    int xd = xPos - xCam;\n                                    int yd = yPos - yCam;\n\n                                    if (m >= 255)\n                                    {\n                                        if (xd * xd + yd * yd < 8 * 8)\n                                        {\n                                            map[xPos + yPos * 1024] = monsterData[m * 16 + 15];\n                                            monsterData[m * 16 + 11] = 0;\n                                            bonusTime = 120;\n                                            if ((m & 1) == 0)\n                                            {\n                                                damage = 20;\n                                            }\n                                            else\n                                            {\n                                                clips = 20;\n                                            }\n                                            continue;\n                                        }\n                                    }\n                                    else if (xd * xd + yd * yd > 340 * 340)\n                                    {\n                                        map[xPos + yPos * 1024] = monsterData[m * 16 + 15];\n                                        monsterData[m * 16 + 11] = 0;\n                                        continue;\n                                    }\n                                }\n\n\n                                int xm = xPos - xCam + 120;\n                                int ym = monsterData[m * 16 + 1] - yCam + 120;\n\n                                int d = monsterData[m * 16 + 2];\n                                if (m == 0)\n                                {\n                                    d = (((int) (playerDir / (Math.PI * 2) * 16 + 4.5 + 16)) & 15);\n                                }\n\n                                d += ((monsterData[m * 16 + 3] / 4) & 3) * 16;\n\n                                int p = (0 * 16 + d) * 144;\n                                if (m > 0)\n                                {\n                                    p += ((m & 15) + 1) * 144 * 16 * 4;\n                                }\n\n                                if (m > 255)\n                                {\n                                    p = (17 * 4 * 16 + ((m & 1) * 16 + (tick & 15))) * 144;\n                                }\n\n                                for (int y = ym - 6; y < ym + 6; y++)\n                                    for (int x = xm - 6; x < xm + 6; x++)\n                                    {\n                                        int c = sprites[p++];\n                                        if (c > 0 && x >= 0 && y >= 0 && x < 240 && y < 240)\n                                        {\n                                            pixels[x + y * 240] = c;\n                                        }\n                                    }\n\n\n                                boolean moved = false;\n\n                                if (monsterData[m * 16 + 10] > 0)\n                                {\n                                    monsterData[m * 16 + 11] += random.nextInt(3) + 1;\n                                    monsterData[m * 16 + 10] = 0;\n\n                                    double rot = 0.25;\n                                    int amount = 8;\n                                    double poww = 32;\n\n\n                                    if (monsterData[m * 16 + 11] >= 2+level)\n                                    {\n                                        rot = Math.PI * 2;\n                                        amount = 60;\n                                        poww = 16;\n                                        map[(xPos) + (yPos) * 1024] = 0xa00000;\n                                        monsterData[m * 16 + 11] = 0;\n                                        score += level;\n                                    }\n                                    for (int i = 0; i < amount; i++)\n                                    {\n                                        double pow = (random.nextInt(100) * random.nextInt(100)) * poww / 10000+4;\n                                        double dir = (random.nextInt(100) - random.nextInt(100)) / 100.0 * rot;\n                                        double xdd = (Math.cos(playerDir + dir) * pow) + random.nextInt(4) - random.nextInt(4);\n                                        double ydd = (Math.sin(playerDir + dir) * pow) + random.nextInt(4) - random.nextInt(4);\n                                        int col = (random.nextInt(128) + 120);\n                                        bloodLoop: for (int j = 2; j < pow; j++)\n                                        {\n                                            int xd = (int) (xPos + xdd * j / pow);\n                                            int yd = (int) (yPos + ydd * j / pow);\n                                            int pp = ((xd) + (yd) * 1024) & (1024 * 1024 - 1);\n                                            if (map[pp] >= 0xff0000) break bloodLoop;\n                                            if (random.nextInt(2) != 0)\n                                            {\n                                                map[pp] = col << 16;\n                                                col = col * 8 / 9;\n                                            }\n                                        }\n                                    }\n\n                                    continue nextMonster;\n                                }\n\n                                int xPlayerDist = xCam - xPos;\n                                int yPlayerDist = yCam - yPos;\n\n                                if (m <= 255)\n                                {\n                                    double rx = -(cos * xPlayerDist - sin * yPlayerDist);\n                                    double ry = cos * yPlayerDist + sin * xPlayerDist;\n\n                                    if (rx > -6 && rx < 6 && ry > -6 && ry < 6 && m > 0)\n                                    {\n                                        damage++;\n                                        hurtTime += 20;\n                                    }\n                                    if (rx > -32 && rx < 220 && ry > -32 && ry < 32 && random.nextInt(10) == 0)\n                                    {\n                                        monsterData[m * 16 + 9]++;\n                                    }\n                                    if (rx > 0 && rx < closestHitDist && ry > -8 && ry < 8)\n                                    {\n                                        closestHitDist = (int) (rx);\n                                        closestHit = m;\n                                    }\n\n                                    dirLoop: for (int i = 0; i < 2; i++)\n                                    {\n                                        int xa = 0;\n                                        int ya = 0;\n                                        xPos = monsterData[m * 16 + 0];\n                                        yPos = monsterData[m * 16 + 1];\n\n                                        if (m == 0)\n                                        {\n                                            if (k[KeyEvent.VK_A]) xa--;\n                                            if (k[KeyEvent.VK_D]) xa++;\n                                            if (k[KeyEvent.VK_W]) ya--;\n                                            if (k[KeyEvent.VK_S]) ya++;\n                                        }\n                                        else\n                                        {\n                                            if (monsterData[m * 16 + 9] < 8) continue nextMonster;\n\n                                            if (monsterData[m * 16 + 8] != 12)\n                                            {\n                                                xPlayerDist = (monsterData[m * 16 + 8]) % 5 - 2;\n                                                yPlayerDist = (monsterData[m * 16 + 8]) / 5 - 2;\n                                                if (random.nextInt(10) == 0)\n                                                {\n                                                    monsterData[m * 16 + 8] = 12;\n                                                }\n                                            }\n\n                                            double xxd = Math.sqrt(xPlayerDist * xPlayerDist);\n                                            double yyd = Math.sqrt(yPlayerDist * yPlayerDist);\n                                            if (random.nextInt(1024) / 1024.0 < yyd / xxd)\n                                            {\n                                                if (yPlayerDist < 0) ya--;\n                                                if (yPlayerDist > 0) ya++;\n                                            }\n                                            if (random.nextInt(1024) / 1024.0 < xxd / yyd)\n                                            {\n                                                if (xPlayerDist < 0) xa--;\n                                                if (xPlayerDist > 0) xa++;\n                                            }\n\n                                            moved = true;\n                                            double dir = Math.atan2(yPlayerDist, xPlayerDist);\n                                            monsterData[m * 16 + 2] = (((int) (dir / (Math.PI * 2) * 16 + 4.5 + 16)) & 15);\n                                        }\n\n                                        ya *= i;\n                                        xa *= 1 - i;\n\n                                        if (xa != 0 || ya != 0)\n                                        {\n                                            map[xPos + yPos * 1024] = monsterData[m * 16 + 15];\n                                            for (int xx = xPos + xa - 3; xx <= xPos + xa + 3; xx++)\n                                                for (int yy = yPos + ya - 3; yy <= yPos + ya + 3; yy++)\n                                                    if (map[xx + yy * 1024] >= 0xfffffe)\n                                                    {\n                                                        map[xPos + yPos * 1024] = 0xfffffe;\n                                                        monsterData[m * 16 + 8] = random.nextInt(25);\n                                                        continue dirLoop;\n                                                    }\n\n                                            moved = true;\n                                            monsterData[m * 16 + 0] += xa;\n                                            monsterData[m * 16 + 1] += ya;\n                                            monsterData[m * 16 + 15] = map[(xPos + xa) + (yPos + ya) * 1024];\n                                            map[(xPos + xa) + (yPos + ya) * 1024] = 0xfffffe;\n                                        }\n                                    }\n                                    if (moved)\n                                    {\n                                        monsterData[m * 16 + 3]++;\n                                    }\n                                }\n                            }\n\n                            if (shoot)\n                            {\n                                if (ammo >= 220)\n                                {\n                                    shootDelay = 2;\n                                    k[1] = false;\n                                }\n                                else\n                                {\n                                    shootDelay = 1;\n                                    ammo += 4;\n                                }\n                                if (closestHit > 0)\n                                {\n                                    monsterData[closestHit * 16 + 10] = 1;\n                                    monsterData[closestHit * 16 + 9] = 127;\n                                }\n                                int glow = 0;\n                                for (int j = closestHitDist; j >= 0; j--)\n                                {\n                                    int xm = +(int) (cos * j) + 120;\n                                    int ym = -(int) (sin * j) + 120;\n                                    if (xm > 0 && ym > 0 && xm < 240 && ym < 240)\n                                    {\n                                        if (random.nextInt(20) == 0 || j == closestHitDist)\n                                        {\n                                            pixels[xm + ym * 240] = 0xffffff;\n                                            glow = 200;\n                                        }\n                                        lightmap[xm + ym * 240] += glow * (255 - lightmap[xm + ym * 240]) / 255;\n                                    }\n                                    glow = glow * 20 / 21;\n                                }\n\n                                if (closestHitDist < 120)\n                                {\n                                    closestHitDist -= 3;\n                                    int xx = (int) (120 + cos * closestHitDist);\n                                    int yy = (int) (120 - sin * closestHitDist);\n\n                                    for (int x = -12; x <= 12; x++)\n                                    {\n                                        for (int y = -12; y <= 12; y++)\n                                        {\n                                            int xd = xx + x;\n                                            int yd = yy + y;\n                                            if (xd >= 0 && yd >= 0 && xd < 240 && yd < 240)\n                                            {\n                                                lightmap[xd + yd * 240] += 2000 / (x * x + y * y + 10) * (255 - lightmap[xd + yd * 240]) / 255;\n                                            }\n                                        }\n                                    }\n\n                                    for (int i = 0; i < 10; i++)\n                                    {\n                                        double pow = random.nextInt(100) * random.nextInt(100) * 8.0 / 10000;\n                                        double dir = (random.nextInt(100) - random.nextInt(100)) / 100.0;\n                                        int xd = (int) (xx - Math.cos(playerDir + dir) * pow) + random.nextInt(4) - random.nextInt(4);\n                                        int yd = (int) (yy - Math.sin(playerDir + dir) * pow) + random.nextInt(4) - random.nextInt(4);\n                                        if (xd >= 0 && yd >= 0 && xd < 240 && yd < 240)\n                                        {\n                                            if (closestHit > 0)\n                                            {\n                                                pixels[xd + yd * 240] = 0xff0000;\n                                            }\n                                            else\n                                            {\n                                                pixels[xd + yd * 240] = 0xcacaca;\n                                            }\n                                        }\n                                    }\n                                }\n                            }\n                        }\n\n\n                        if (damage >= 220)\n                        {\n                            k[1] = false;\n                            hurtTime = 255;\n                            continue restart;\n                        }\n                        if (k[KeyEvent.VK_R] && ammo > 20 && clips < 220)\n                        {\n                            shootDelay = 30;\n                            ammo = 20;\n                            clips += 10;\n                        }\n\n                        if (xCam > xWin0 && xCam < xWin1 && yCam > yWin0 && yCam < yWin1)\n                        {\n                            continue winLevel;\n                        }\n                    }\n\n                    bonusTime = bonusTime * 8 / 9;\n                    hurtTime /= 2;\n\n                    for (int y = 0; y < 240; y++)\n                    {\n                        for (int x = 0; x < 240; x++)\n                        {\n                            int noise = random.nextInt(16) * random.nextInt(16) / 16;\n                            if (!gameStarted) noise *= 4;\n\n                            int c = pixels[x + y * 240];\n                            int l = lightmap[x + y * 240];\n                            lightmap[x + y * 240] = 0;\n                            int r = ((c >> 16) & 0xff) * l / 255 + noise;\n                            int g = ((c >> 8) & 0xff) * l / 255 + noise;\n                            int b = ((c) & 0xff) * l / 255 + noise;\n\n                            r = r * (255 - hurtTime) / 255 + hurtTime;\n                            g = g * (255 - bonusTime) / 255 + bonusTime;\n                            pixels[x + y * 240] = r << 16 | g << 8 | b;\n                        }\n                        if (y % 2 == 0 && (y >= damage && y < 220))\n                        {\n                            for (int x = 232; x < 238; x++)\n                            {\n                                pixels[y * 240 + x] = 0x800000;\n                            }\n                        }\n                        if (y % 2 == 0 && (y >= ammo && y < 220))\n                        {\n                            for (int x = 224; x < 230; x++)\n                            {\n                                pixels[y * 240 + x] = 0x808000;\n                            }\n                        }\n                        if (y % 10 < 9 && (y >= clips && y < 220))\n                        {\n                            for (int x = 221; x < 222; x++)\n                            {\n                                pixels[y * 240 + 221] = 0xffff00;\n                            }\n                        }\n                    }\n\n                    ogr.drawString(\"\" + score, 4, 232);\n                    if (!gameStarted)\n                    {\n                        ogr.drawString(\"Left 4k Dead\", 80, 70);\n                        if (k[1] && hurtTime == 0)\n                        {\n                            score = 0;\n                            gameStarted = true;\n                            k[1] = false;\n                        }\n                    }\n                    else if (tick < 60)\n                    {\n                        ogr.drawString(\"Level \" + level, 90, 70);\n                    }\n\n                    sg.drawImage(image, 0, 0, 480, 480, 0, 0, 240, 240, null);\n                    do\n                    {\n                        Thread.yield();\n                    }\n                    while (System.nanoTime() - lastTime < 0);\n                    if (!isActive()) return;\n\n                    lastTime += (1000000000 / 30);\n                }\n            }\n        }\n    }\n\n    public void processEvent(AWTEvent e)\n    {\n        boolean down = false;\n        switch (e.getID())\n        {\n            case KeyEvent.KEY_PRESSED:\n                down = true;\n            case KeyEvent.KEY_RELEASED:\n                k[((KeyEvent) e).getKeyCode()] = down;\n                break;\n            case MouseEvent.MOUSE_PRESSED:\n                down = true;\n            case MouseEvent.MOUSE_RELEASED:\n                k[((MouseEvent) e).getButton()] = down;\n            case MouseEvent.MOUSE_MOVED:\n            case MouseEvent.MOUSE_DRAGGED:\n                m = ((MouseEvent) e).getX() / 2 + ((MouseEvent) e).getY() / 2 * 240;\n        }\n    }\n}\n\n"
  },
  {
    "path": "README.md",
    "content": "# thejustcause.github.io\n"
  },
  {
    "path": "TimeTable.html",
    "content": "<!DOCTYPE html>\n  <html>\n    <head>\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">\n<!-- CSS IS NOW IN THE STYLE.CSS FILE, BECAUSE NO ONE LIKES INLINE CSS IT SHOULD BE A CRIME or something -->\n    </head>\n    <body>\n\n\n      <div id=\"header\" data-role=\"header\" data-position=\"fixed\">\n         <h1>The House of Thorns</h1>\n      </div>\n\n       <div id=\"header2\">\n        <form action=\"/index.html\">\n          <input type=\"submit\" value=\"Home\" />\n        </form>\n        \n        <form action=\"/TimeTable.html\">\n          <input type=\"submit\" value=\"Time Table\" />\n        </form>\n      </div>\n      \n      <style>\n      table {\n    font-family: arial, sans-serif;\n    border-collapse: collapse;\n    width: 100%;\n    color: #8d61ba;\n}\n\ntd, th {\n    border: 1px solid #8d61ba;\n    text-align: left;\n    padding: 8px;\n}\n\ntr:nth-child(even) {\n    background-color: #dddddd;\n}\n</style>\n</head>\n<body>\n\n<table>\n  <tr>Week 1</tr>\n  <tr>\n    <th>Lesson</th>\n    <th>Tue</th>\n    <th>Wed</th>\n    <th>Thu</th>\n    <th>Fri</th>\n  </tr>\n  <!--- Lesson 1--->\n  <tr>\n    <td>Free</td>\n    <td>Free</td>\n    <td>ICT</td>\n    <td>Business</td>\n    <td>Free</td>\n  </tr>\n  <!--- Lesson 2--->\n  <tr>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Business</td>\n    <td>Business</td>\n    <td>Free</td>\n  </tr>\n  <!--- Lesson 3--->\n  <tr>\n    <td>Free</td>\n    <td>Business</td>\n    <td>Business</td>\n    <td>ICT</td>\n    <td>Business</td>\n  </tr>\n  <!--- Lesson 4--->\n  <tr>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Free</td>\n  </tr>\n  <!--- Lesson 5--->\n  <tr>\n    <td>Free</td>\n    <td>Free</td>\n    <td>ICT</td>\n    <td>Free</td>\n    <td>Free</td>\n  </tr>\n</table>\n\n<table>\n  <tr>Week 2</tr>\n  <tr>\n    <th>Mon</th>\n    <th>Tue</th>\n    <th>Wed</th>\n    <th>Thu</th>\n    <th>Fri</th>\n  </tr>\n  <!--- Lesson 1--->\n  <tr>\n    <td>Free</td>\n    <td>Free</td>\n    <td>ICT</td>\n    <td>ICT</td>\n    <td>ICT</td>\n  </tr>\n  <!--- Lesson 2--->\n  <tr>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Business</td>\n    <td>ICT</td>\n    <td>Free</td>\n  </tr>\n  <!--- Lesson 3--->\n  <tr>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Business</td>\n  </tr>\n  <!--- Lesson 4--->\n  <tr>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Free</td>\n    <td>ICT</td>\n    <td>Free</td>\n  </tr>\n  <!--- Lesson 5--->\n  <tr>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Free</td>\n    <td>Free</td>\n  </tr>\n</table>\n\n      <div id=\"footer\" data-role=\"footer\" data-position=\"fixed\">\n          &copy; Copyright | TheJustCause99 | https://www.youtube.com/user/MrJustcause99\n      </div>\n\n    </body>\n  </html>\n"
  },
  {
    "path": "backup",
    "content": "<!DOCTYPE html>\n<html>\n<div class=\"contain-to-grid sticky\">\n  <nav class=\"top-bar\" data-topbar role=\"navigation\" data-options=\"sticky_on: large\">\n    Navigation Bar (If it works)\n  </nav>\n</div>\n  <ul class=\"title-area\">\n    <li class=\"name\">\n      <h1><a href=\"#\">My Site</a></h1>\n    </li>\n     <!-- Remove the class \"menu-icon\" to get rid of menu icon. Take out \"Menu\" to just have icon alone -->\n    <li class=\"toggle-topbar menu-icon\"><a href=\"#\"><span>Menu</span></a></li>\n  </ul>\n  \n  <li class=\"has-form\">\n  <div class=\"row collapse\">\n    <div class=\"large-8 small-9 columns\">\n      <input type=\"text\" placeholder=\"Find Stuff\">\n    </div>\n    <div class=\"large-4 small-3 columns\">\n      <a href=\"#\" class=\"alert button expand\">Search</a>\n    </div>\n  </div>\n</li>\n\n  <section class=\"top-bar-section\">\n    <!-- Right Nav Section -->\n    <ul class=\"right\">\n      <li class=\"active\"><a href=\"#\">Right Button Active</a></li>\n      <li class=\"has-dropdown\">\n        <a href=\"#\">Right Button Dropdown</a>\n        <ul class=\"dropdown\">\n          <li><a href=\"#\">First link in dropdown</a></li>\n          <li class=\"active\"><a href=\"#\">Active link in dropdown</a></li>\n        </ul>\n      </li>\n    </ul>\n\n    <!-- Left Nav Section -->\n    <ul class=\"left\">\n      <li><a href=\"#\">Left Nav Button</a></li>\n    </ul>\n  </section>\n</nav>\n</html>\n\n<script src=\"G.java\"></script>\n"
  },
  {
    "path": "index.html",
    "content": "<!DOCTYPE html>\n  <html>\n    <head>\n      <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">\n<!-- CSS IS NOW IN THE STYLE.CSS FILE, BECAUSE NO ONE LIKES INLINE CSS IT SHOULD BE A CRIME or something -->\n    </head>\n    <body>\n\n\n      <div id=\"header\" data-role=\"header\" data-position=\"fixed\">\n        <h1>The House of Thorns</h1>\n      </div>\n\n      <div id=\"header2\">\n        <form action=\"/index.html\">\n          <input type=\"submit\" value=\"Home\" />\n        </form>\n        \n        <form action=\"/TimeTable.html\">\n          <input type=\"submit\" value=\"Time Table\" />\n        </form>\n      </div>\n\n\n      <div id=\"footer\" data-role=\"footer\" data-position=\"fixed\">\n       &copy; Copyright | TheJustCause99 | https://www.youtube.com/user/MrJustcause99\n      </div>\n\n    </body>\n  </html>\n"
  },
  {
    "path": "style.css",
    "content": "* { \n    margin:0px;\n    padding:0px;\n}\nbody {\n    background:url('http://lorempixel.com/1280/1080/technics/4/') no-repeat center center fixed;\n\tbackground-size:cover;\n    \n}\n#header {\n    background-color:#1F3A93;\n    color:white;\n    padding:40px;\n\topacity:0.9;\n}\n#header2 {\n    background-color:#446CB3;\n\tpadding:35px;\n\topacity:0.6;\n}\n#nav {\n    line-height:30px;\n    background-color:#eeeeee;\n    height:300px;\n    width:100px;\n    float:left;\n    padding:50px;\t      \n}\n#section {\n    width:350px;\n    float:left;\n    padding:10px;\t \t \n}\n#footer {\n    background-color:#1F3A93;\n    color:white;\n    clear:both;\n    text-align:center;\n    padding:5px;\n    opacity:0.9;\n    position:fixed;\n    height:20px;\n    bottom:0px;\n    left:0px;\n    right:0px;\n    margin-bottom:0px;\t\n}\n"
  }
]