public void PickAt(int x, int y) { var index = (_cities.FindIndex(c => Math.Abs(c.LocationX - x) < 0.001 && Math.Abs(c.LocationY - y) < 0.001 )) ; if (index != -1) { _cities.RemoveAt(index); } _cities.Add(new City(x, y)); _planner = new Planner(_cities.ToArray()); }
public void Reset() { _cities.Clear(); _planner = new Planner(_cities.ToArray()); }
public ViewModel() { _planner = new Planner(); }