public List <int> Slots(Team team) { _history.Update(); List <int> slots = new List <int>(); foreach (int slot in SlotConstants.AllSlots(team)) { SlotContent currentSlotContent = _history.Current(slot); if (SlotContentIsInCategory(currentSlotContent)) { slots.Add(slot); } } return(slots); }
// Todo: Modify the parameter with enum public void SetContent(SlotContent slot) { if (slot == SlotContent.White) { Image img = new Image(); img.Source = WHITE_PAWN; this.Content = img; } else if (slot == SlotContent.Black) { Image img = new Image(); img.Source = BLACK_PAWN; this.Content = img; } else if (slot == SlotContent.Nothing) { this.Content = null; } }
internal override bool SlotContentIsInCategory(SlotContent content) { return(true); }
internal abstract bool SlotContentIsInCategory(SlotContent content);
internal override bool SlotContentIsInCategory(SlotContent content) { return(content == SlotContent.Bot); }