public void run() {
            paintLS = new LiveSystem(level, panelWidth, panelHeight);
            physicsLS = new LiveSystem(paintLS);
            frame.getContentPane().add(actP);
            frame.getContentPane().validate();
            frame.getContentPane().repaint();
            actP.requestFocusInWindow();
            boolean levelComplete = false;
            int endLevelPauseCount = 0;
            double countTo = 200;
            long loopTime = new Date().getTime();
            long paintTime = 16;
            while(levelComplete == false) {
                long msStart = new Date().getTime();

                physicsLS.updatePhysics();

                synchronized (LiveSystemCopyMutex) {
                  paintLS = physicsLS;
                  physicsLS = new LiveSystem(paintLS);
                }

                actP.repaint();
                if (paintTime >= 16) {
                    paintTime = 0;
                    if (physicsLS.enemiesRemain() == false
                        || physicsLS.hero.status == ShipStatus.DEAD) {
                        ++endLevelPauseCount;
                    }
                }
                try {
                    // Make sure that the game runs at the same speed on all
                    // systems.
                    msStart = 4 - (new Date().getTime() - msStart);
                    if (msStart > 0)
                        Thread.sleep(msStart);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (endLevelPauseCount >= countTo)
                    levelComplete = true;
                paintTime += new Date().getTime() - loopTime;
                loopTime = new Date().getTime();
            }
            if (physicsLS.enemiesRemain())
                level = 1;
            else
                ++level;
            actP.nextPanel();
        }