The number of cardinal neighbors of the tile at column x row y
x
y
int countNeighbors(int x, int y) => neighbors(x, y).length;