Make judge event internal.

This commit is contained in:
2023-05-20 22:36:08 +08:00
parent 906c82972b
commit ca928eb731
3 changed files with 6 additions and 6 deletions

View File

@@ -20,13 +20,13 @@ namespace Cryville.Crtr {
annotations = a.ToHashSet();
}
public virtual void Optimize(PdtEvaluatorBase etor, PdtExpression value) { etor.Optimize(value); }
public abstract bool Execute(IJudge judge, JudgeEvent ev, float time, PdtExpression exp, int depth);
internal abstract bool Execute(IJudge judge, JudgeEvent ev, float time, PdtExpression exp, int depth);
public class Pass : JudgeAction {
readonly Identifier[] _targets;
public Pass(IEnumerable<string> a, IEnumerable<Identifier> k) : base(a) {
_targets = k.ToArray();
}
public override bool Execute(IJudge judge, JudgeEvent ev, float time, PdtExpression exp, int depth) {
internal override bool Execute(IJudge judge, JudgeEvent ev, float time, PdtExpression exp, int depth) {
return judge.Pass(ev, time, _targets, depth);
}
}
@@ -42,7 +42,7 @@ namespace Cryville.Crtr {
base.Optimize(etor, value);
if (_op.op != default(Identifier)) PdtExpression.PatchCompound(_op.name.Key, _op.op.Key, value);
}
public override bool Execute(IJudge judge, JudgeEvent ev, float time, PdtExpression exp, int depth) {
internal override bool Execute(IJudge judge, JudgeEvent ev, float time, PdtExpression exp, int depth) {
judge.UpdateScore(_op, exp);
return false;
}