public XMLloop(XMLTree tree) { checkpoints = new List <Tuple <int, int, int> >(); for (int i = 0; i < tree.ChildCount(); i++) { XMLTree t = tree.Child(i); if (t.Name().Equals("finish")) { finish = new Tuple <int, int>(int.Parse(t.Attribute("x")), int.Parse(t.Attribute("setback"))); } else { checkpoints.Add(new Tuple <int, int, int>( int.Parse(t.Attribute("x")), int.Parse(t.Attribute("y")), int.Parse(t.Attribute("height")) )); } } }