while (contains(x - 1, y + 1, color) == 1) {
                x--;
                y++;
                count++;
            }