identifies if a given cell is on the edge of the board