internal override VisibleObject Copy(VisibleObject parent) { Marker marker = new Aim(Cell); marker.Parent = (EntityCollection)parent; return(marker); }
internal Marker ReadMarker(GameField field) { String str = sr.ReadLine(); Marker marker = null; while (!str.Contains("End marker")) { String type = str; str = sr.ReadLine(); switch (type) { case "Aim": marker = new Aim(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]); break; case "Circle": marker = new Circle(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]); break; case "Check": marker = new Check(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]); break; case "Flag": marker = new Flag(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]); break; case "XMark": marker = new XMark(field.Field[Int32.Parse(str.Split(' ').ElementAt(0)), Int32.Parse(str.Split(' ').ElementAt(1))]); break; } str = sr.ReadLine(); } return marker; }
internal override VisibleObject Copy(VisibleObject parent) { Marker marker = new Aim(Cell); marker.Parent = (EntityCollection)parent; return marker; }