/// <summary> /// Constructor specifiing city name, vertex on which it lies and color of the city /// </summary> /// <param name="name">Name of the city</param> /// <param name="position">Vertex on which the city is</param> /// <param name="color">Color of the city</param> public City(string name, Vertex position, CityColor color) { id = count++; this.name = name; this.position = position; this.color = color; }
/// <summary> /// Gets actual Brush from the CityColor parameter /// </summary> /// <param name="c">Color in the CityColor form</param> /// <returns>Actual WPF Brush</returns> private Brush GetColorFromCity(CityColor c) { switch (c) { case CityColor.BLUE: return(Brushes.LightBlue); case CityColor.GREEN: return(Brushes.LightGreen); case CityColor.ORANGE: return(Brushes.Orange); case CityColor.RED: return(Brushes.Salmon); case CityColor.YELLOW: return(Brushes.LightYellow); } return(null); }