Пример #1
0
 public void InsertCardToGroup(PlayingCard targetCard, int index)
 {
     // determine if the index value is within the range of the group list
     // check to see if group count is greater than the index value
     if (_group.Count > index)
     {
         // if group count is greater than index value, then insert the card at the target index
         _group.Insert(index, targetCard);
     }
     else
     {
         // if group count is not greater than index value, display an error message
         MessageBox.Show("Tried to insert card at index " + index + " in group " + _identifier + " whose count is " + _group.Count,
                         "Card Group Access Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #2
0
 public void AddCardToGroup(PlayingCard targetCard)
 {
     _group.Add(targetCard);
 }