public void run() {
        init();
        this.requestFocus();

        long startTime = System.nanoTime();
        long previousTime = System.nanoTime();
        long tempTime = System.nanoTime();
        long currentTime;

        double updateRate = 60.0;
        long ns = 1000000000;
        double delta = 0;
        int updates = 0;
        int frames = 0;

        while (running) {
            runningTime = (System.nanoTime() - startTime) / ns;
            currentTime = System.nanoTime();
            delta += ((currentTime - previousTime) * updateRate) / ns;
            previousTime = currentTime;

            // Makes the game update 60 times per second
            while (delta >= 1) {
                tick();
                updates++;
                delta--;
            }

            // Update as fast as possible
            render();
            frames++;

            // Info printed to console each second
            if ((currentTime - tempTime) >= ns) {
                fps = frames;
                System.out.println("FPS: " + fps + " TICKS: " + updates
                        + " TIME: " + runningTime + " STATE: " + Game.state);
                if (state == STATE.GAME) {
                    System.out.println(handler.playerObject.getX() + " | " + handler.playerObject.getY());
                }
                frames = 0;
                updates = 0;
                tempTime = currentTime;
            }
        }
    }