public static int[] [] nextState(int [] [] currentCells){
		int [][] nextState = new int[n][n];
		for(int i = 0; i<n; i++){
			for(int j = 0; j<n; j++){

				int neighbourcells = 0;
				neighbourcells = currentCells[i+1][j] + currentCells[i+1][j+1]+ currentCells[i+1][j-1]+ currentCells[i][j-1]+ currentCells[i-1][j-1]+ currentCells[i-1][j]+ currentCells[i-1][j+1]+ currentCells[i][j+1];
				if(currentCells[i][j]==1){
					if(neighbourcells < 2 ){
						nextState[i][j]=0;
					} else if(neighbourcells > 3){
						nextState[i][j]=0;
					}else if(neighbourcells == 2 || neighbourcells == 3 ){

					}
				}
				else{ 
					if(neighbourcells == 3){
						nextState[i][j]=1;
					}

				}

			}
		}
		return nextState;
	}