public override void WriteNodes(Writer writer) { for (int i = 0; i < Prisoners.Count; i++) { Digger digger = Prisoners[i]; digger.Label = "[i " + i + "]"; writer.WriteNode(digger); } }
public override Node CreateNode(string label) { if (Parser.IsId(label)) { var digger = new Digger(label); Prisoners.Add(digger); return digger; } else { return base.CreateNode(label); } }