Something
public text v1 · immutableprivate int getNeighbours(LifeBoard board, int row, int col){
int sum;
for(int r=1; r<(row-1); r++)
for(int c=1; c<(col-1); c++){
sum=0;
for(int x=r-1; x<r+1; x++)
for(int y=c-1; y<c+1; y++){
if(myBoard.get(x, y)){
sum++;
}
}
}
return sum;
}