public void generation(GameField currentField, GameField generateTo) {
        if(currentField.width!=generateTo.width || currentField.height!=generateTo.height) {
            //what the holy fuck are you trying to do?
            throw new RuntimeException();
        }
        
        this.currentField=currentField;
        this.nextField=generateTo;
        
        synchronized(generateTo.lock){
        synchronized(currentField.lock) {
        for(int ix=0;ix<currentField.width;ix++) {
            for(int iy=0;iy<currentField.height;iy++) {
                byte numNeighbours=getNumOfNeighbours(currentField, ix, iy);
                if(currentField.aliveCells[ix][iy]) {
                    //i'm alive!
                    if(numNeighbours<2) {
                        generateTo.aliveCells[ix][iy]=false; //alive, less than 2 neighbours --> DEATH
                    } else if(numNeighbours<=3) {
                        generateTo.aliveCells[ix][iy]=true; // alive, 2/3 neighbours --> lives on
                    } else {
                        generateTo.aliveCells[ix][iy]=false; // alive, 4+ neighbours --> overcrowding
                    }
                } else {
                    //i'm dead!
                    if(numNeighbours==3) {
                        generateTo.aliveCells[ix][iy]=true; // dead, 3 neighbours -> new life!
                    } else {
                        generateTo.aliveCells[ix][iy]=false; // anything else won't do nothing.
                    }
                }
            }
        }
        generateTo.generation=currentField.generation+1;
        } }
    }