public static void run(){
        try{
            while(true){
                cWaitTime=waitTime;
                synchronized (LOCK){
                    while (!running){
                        LOCK.wait();
                    }
                    if (!field.act(curP)){
                        int lC = field.takePolyomino(curP);
                        setLinesCleared(lC+linesCleared);
                        curP=getRanPoly();
                        if (field.lose()){
                            newGame=true;
                        }
                    }
                    if (newGame){
                        newGame=false;
                        newGame();
                    }
                    fieldPanel.repaint();
                }
                t = System.currentTimeMillis();
                Thread.sleep(waitTime/8);
                synchronized (LOCK){
                    while (System.currentTimeMillis()-t<cWaitTime)
                        LOCK.wait(waitTime/16);
                }
            }
        } catch (InterruptedException ex) {
            Logger.getLogger(Gui.class.getName()).log(Level.SEVERE, null, ex);
        }
    }