Add judge area definition.

This commit is contained in:
2023-05-11 16:15:57 +08:00
parent 3e273d67ba
commit fe4280aa2e
2 changed files with 15 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ namespace Cryville.Crtr {
etor.Optimize(e.Value);
}
}
foreach (var j in judges) {
foreach (var j in judges.Judges) {
var judge = j.Value;
if (judge.hit != null) etor.Optimize(judge.hit);
if (judge.scores != null) {
@@ -52,6 +52,9 @@ namespace Cryville.Crtr {
}
}
}
foreach (var a in judges.Areas) {
etor.Optimize(a.Value);
}
foreach (var s in scores) {
var score = s.Value;
if (score.value != null) etor.Optimize(score.value);
@@ -62,6 +65,12 @@ namespace Cryville.Crtr {
constraints.PrePatch(chart);
}
}
public class JudgeDefinitionCollection {
[ElementList]
public Dictionary<Identifier, JudgeDefinition> Judges = new Dictionary<Identifier, JudgeDefinition>();
[PropertyList]
public Dictionary<Identifier, PdtExpression> Areas = new Dictionary<Identifier, PdtExpression>();
}
public class Constraint {
static readonly PropOp.Arbitrary _arbop = new PropOp.Arbitrary();
[ElementList]