private void addObtacle(Point p, string obtacleName) { obtacles.Remove(p); if (!CLEAR_OBTACLE.Equals(listBox1.SelectedItem)) { IObstacle obtacle = ObstacleManager.GetObtacle(obtacleName, p.X, p.Y); obtacles.Add(p, obtacle); } }