Make judge event internal.
This commit is contained in:
@@ -11,7 +11,7 @@ using System.Text.Formatting;
|
||||
using UnsafeIL;
|
||||
|
||||
namespace Cryville.Crtr {
|
||||
public struct JudgeEvent {
|
||||
internal struct JudgeEvent {
|
||||
public double StartTime { get; set; }
|
||||
public double EndTime { get; set; }
|
||||
public double StartClip { get; set; }
|
||||
@@ -20,7 +20,7 @@ namespace Cryville.Crtr {
|
||||
public JudgeDefinition Definition { get; set; }
|
||||
public NoteHandler Handler { get; set; }
|
||||
}
|
||||
public interface IJudge {
|
||||
internal interface IJudge {
|
||||
bool Pass(JudgeEvent ev, float time, Identifier[] ids, int depth);
|
||||
void UpdateScore(ScoreOperation op, PdtExpression exp);
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -150,7 +150,7 @@ namespace Cryville.Crtr {
|
||||
return gh.GetCurrentFrame(func, track);
|
||||
}
|
||||
|
||||
public void ReportJudge(JudgeEvent ev, float time, Identifier result) {
|
||||
internal void ReportJudge(JudgeEvent ev, float time, Identifier result) {
|
||||
JudgeState state;
|
||||
if (!judges.TryGetValue(ev.BaseEvent, out state)) return;
|
||||
state.MarkJudged(time, (float)(ev.StartTime - time), result.Key);
|
||||
|
Reference in New Issue
Block a user