public override bool Equals(object other) { AdvanceableProduction p = (AdvanceableProduction)other; return(p.current == current && p.min == min && p.Max == Max && p.prod.Equals(this.prod)); }
public Enumerator(AdvanceableProduction prod) { #if GATHERING_STATS InstanceCount++; #endif min = prod.Min; start = prod.Min - 1; max = prod.Max; target = prod.prod; }
private string ToString0(AdvanceableProduction production) { StringBuilder sb = new StringBuilder(); sb.AppendFormat("[{0} => ", Name); for (int i = 0; i < production.Min; i++) { sb.AppendFormat("{0} ", production[i]); } sb.Append("!"); for (int i = production.Min; i < production.Position; i++) { sb.AppendFormat("{0} ", production[i]); } sb.Append("@"); for (int i = production.Position; i < production.Max; i++) { sb.AppendFormat("{0} ", production[i]); } sb.AppendFormat(", {0}]", LookaheadSymbol); return(sb.ToString()); }
public AdvanceableProduction(AdvanceableProduction adv) : this(adv.Target, adv.Min) { current = adv.Position; }