int map_component(int side, int x, int y, boolean map[][]) {
        int total = 1;
        map[x][y] = true;
        for (int dx = -1; dx <= 1; dx++)
            for (int dy = -1; dy <= 1; dy++) {
                if (dx == 0 && dy == 0)
                    continue;
                int nx = x + dx;
                int ny = y + dy;
                if (clipped(nx) || clipped(ny))
                    continue;
                if (mBoard[nx][ny] != checker_of(side))
                    continue;
                if (map[nx][ny])
                    continue;
                total += map_component(side, nx, ny, map);
            }
        return total;
    }