public void update(){
        if(!ctrl.isRunning()){
            start();
        }
        checkEndConditions();
        
        if(ctrl.isRunning()){
            timer.addMillis((lastCount-ctrl.getEnemyShipCount())*500);
            lastCount=ctrl.getEnemyShipCount();
            if(ctrl.getEnemyShipCount()==0){               
                for (int i = 0; i < nextSpawnAmount; i++) {
                    spawnShipRandomly();
                }
                lastCount=nextSpawnAmount;
                nextSpawnAmount=nextSpawnAmount*2;             
            }
            timer.update();
        }
        ctrl.update();
    }