레벨 밸런스 1000까지 확장 및 박스 상한 규칙 적용

This commit is contained in:
JiWoong Sul
2025-12-04 14:48:11 +09:00
parent ed84c9d9e8
commit d073bc8814
11 changed files with 3323 additions and 607 deletions

View File

@@ -352,13 +352,221 @@ internal static class MaskLibrary
}
};
// 세로 확장형 마스크(폭 8~12, 회전 없이 사용)
public static readonly List<string[]> Tall8 = new()
{
new[]{
"########",
"#......#",
"#.####.#",
"#.#..#.#",
"#.#..#.#",
"#.####.#",
"#......#",
"########"
},
new[]{
"########",
"#..##..#",
"#..##..#",
"#......#",
"#.####.#",
"#.#..#.#",
"#......#",
"###..###",
"########"
},
new[]{
"########",
"#......#",
"##.##.##",
"#......#",
"#.####.#",
"#......#",
"##.##.##",
"#......#",
"########"
}
};
public static readonly List<string[]> Tall9 = new()
{
new[]{
"#########",
"#.......#",
"#.#####.#",
"#.#...#.#",
"#.#.#.#.#",
"#.#...#.#",
"#.#####.#",
"#.......#",
"#########"
},
new[]{
"#########",
"#...#...#",
"#...#...#",
"###.#.###",
"#.......#",
"#.#####.#",
"#.#...#.#",
"#.#...#.#",
"#...#...#",
"#########"
},
new[]{
"#########",
"#.......#",
"#.###.#.#",
"#.#.#.#.#",
"#.#.#.#.#",
"#.#.#.#.#",
"#.###.#.#",
"#.......#",
"#.###.#.#",
"#.......#",
"#########"
}
};
public static readonly List<string[]> Tall10 = new()
{
new[]{
"##########",
"#........#",
"##.####.##",
"#..#..#..#",
"#..####..#",
"#........#",
"###.##.###",
"#........#",
"##.####.##",
"##########"
},
new[]{
"##########",
"#...##...#",
"#...##...#",
"###.##.###",
"#........#",
"#.######.#",
"#.#....#.#",
"#.######.#",
"#........#",
"###.##.###",
"#...##...#",
"##########"
},
new[]{
"##########",
"#........#",
"#.######.#",
"#.#....#.#",
"#.#.##.#.#",
"#.#.##.#.#",
"#.#....#.#",
"#.######.#",
"#........#",
"###.##.###",
"#........#",
"#.######.#",
"##########"
}
};
public static readonly List<string[]> Tall11 = new()
{
new[]{
"###########",
"#.........#",
"#.#######.#",
"#.#.....#.#",
"#.#.###.#.#",
"#.#.#.#.#.#",
"#.#.###.#.#",
"#.#.....#.#",
"#.#######.#",
"#.........#",
"###.###.###",
"#.........#",
"#.#######.#",
"#.#.....#.#",
"#.#.###.#.#",
"###########"
},
new[]{
"###########",
"#....#....#",
"#....#....#",
"###.#.#.###",
"#.........#",
"#.#######.#",
"#.#.....#.#",
"#.#.###.#.#",
"#.#.#.#.#.#",
"#.#.###.#.#",
"#.#.....#.#",
"#.#######.#",
"#.........#",
"###.#.#.###",
"#....#....#",
"#....#....#",
"###.....###",
"###########"
}
};
public static readonly List<string[]> Tall12 = new()
{
new[]{
"############",
"#..........#",
"#.########.#",
"#.#......#.#",
"#.#.####.#.#",
"#.#.#..#.#.#",
"#.#.#..#.#.#",
"#.#.####.#.#",
"#.#......#.#",
"#.########.#",
"#..........#",
"###.####.###",
"#..........#",
"#.########.#",
"#.#......#.#",
"#.#.####.#.#",
"#..........#",
"############"
},
new[]{
"############",
"#....##....#",
"#....##....#",
"###.####.###",
"#..........#",
"#.########.#",
"#.#......#.#",
"#.#.####.#.#",
"#.#.#..#.#.#",
"#.#.####.#.#",
"#.#......#.#",
"#.########.#",
"#..........#",
"###.####.###",
"#....##....#",
"#....##....#",
"###......###",
"############"
}
};
public static string[] PickRandom(Random rng, List<string[]> masks)
{
if (masks.Count == 0) throw new System.InvalidOperationException("No masks provided.");
return masks[rng.Next(masks.Count)];
}
public static List<string[]> ExpandWithTransforms(IEnumerable<string[]> baseMasks, int padMin = -1, int padMax = 1)
public static List<string[]> ExpandWithTransforms(IEnumerable<string[]> baseMasks, int padMin = -1, int padMax = 1, bool allowTransforms = true)
{
var seen = new HashSet<string>();
var output = new List<string[]>();
@@ -367,7 +575,8 @@ internal static class MaskLibrary
var seeds = ScaleVariants(mask, padMin, padMax);
foreach (var seed in seeds)
{
foreach (var variant in Variants(seed))
var variants = allowTransforms ? Variants(seed) : new[] { seed };
foreach (var variant in variants)
{
var key = CanonicalKey(variant);
if (seen.Add(key))