public static Rectangle GetIconPosition(ConcretePlace place) { if (!_placesIcons.ContainsKey(place)) { return(Rectangle.Empty); } return(_placesIcons[place]); }
private void BoardIconClicked(ConcretePlace concretePlace) { Console.WriteLine($"Icon clicked: {concretePlace}"); var place = GameData.GetPlaceById((int)concretePlace); if (place is IHorse horse) { var underShadowDrawable = new UnderShadowDrawable(new Rectangle(_boardDrawable.GetX(), _boardDrawable.GetY(), _boardDrawable.GetWidth(), _boardDrawable.GetHeight())); var cardDrawable = new HorseCardDrawable(new Point(724 / 2, 724 / 2), horse); underShadowDrawable.Clicked += () => { _view.RemoveDrawable(underShadowDrawable); _view.RemoveDrawable(cardDrawable); }; _view.AddDrawable(underShadowDrawable); _view.AddDrawable(cardDrawable); } }
private void BoardPositionClicked(ConcretePlace concretePlace) { Console.WriteLine($"Place clicked: {concretePlace}"); }
protected Horse(ConcretePlace concretePlace, string name, Color color) { _concretePlace = concretePlace; _name = name; _color = color; }
public Place(ConcretePlace concretePlace, string name, Color color) { ConcretePlace = concretePlace; Name = name; Color = color; }