These arrays are used to get row and column numbers of 8 neighbours of a given cell
int [ ] rowNbr = { - 1 , - 1 , - 1 , 0 , 0 , 1 , 1 , 1 } ; int [ ] colNbr = { - 1 , 0 , 1 , - 1 , 1 , - 1 , 0 , 1 } ;