public void CheckDiscardCandidateFollowingSingleOptions(Candidate k, out Requirement c, out int o) { if (k != null) { DiscardCandidate(k); } int sc = tsc; c = FollowSingleOptions(); o = 1; if (c != null) { o = c.s; } while (tsc > sc) { UnselectCandidate(); } UndiscardCandidate(k); }
public void CheckSelectCandidateFollowingSingleOptions(Candidate k, out Requirement c, out int o, out int steps) { int sc = tsc; if (k != null) { SelectCandidate(k); } c = FollowSingleOptions(); steps = tsc - sc; o = 1; if (c != null) { o = c.s; } while (tsc > sc) { UnselectCandidate(); } }
public void AddCandidate(Requirement c) { Tile t = new Tile(); t.k = this; if (tile == null) { tile = t; } else { tile.r.l = t; t.r = tile.r; tile.r = t; t.l = tile; } t.c = c; c.s++; t.d = c.d; c.d.u = t; c.d = t; t.u = c; t.included = true; }
/* * public static Tile AddToCandidate<C>(Tile x, Requirement c) * { * Tile t = new Tile(); * t.ClearTile(); * if (x != null) * { * x.r.l = t; * t.r = x.r; * x.r = t; * t.l = x; * } * t.c = c; * c.s++; * t.d = c.d; * c.d.u = t; * c.d = t; * t.u = c; * t.included = true; * return t; * } */ protected void ClearTile() { l = r = u = d = this; c = null; included = false; }
public ImpossibleHint(Requirement c) { this.c = c; }
public SelectableHint(Candidate r, Requirement c) { this.r = r; this.c = c; }
public DiscardableHint(Candidate r, Requirement c, bool eventual) { this.r = r; this.c = c; this.eventual = eventual; }
public override void PaintBackground(HintPainter context) { Requirement.PaintBackground(context, Hint.Kind.AmongMust); Candidate.PaintBackground(context, Hint.Kind.Must); }
public ForcedMoveHint(Requirement c, Candidate r) { this.c = c; this.r = r; }