Exemplo n.º 1
0
 private void AddEventCardToHand(EventCard card)
 {
     if (!_game.AddCardToHand(_playerId, CardType.EVENT, card))
     {
         var swapCards = new SwapCardForm(card, _game.GetPlayersPivotalEventCards(_playerId), CardType.EVENT);
         swapCards.ShowDialog();
         if (swapCards.DialogResult == DialogResult.OK)
         {
             var discardedCard = (EventCard)swapCards.CardToBeRemoved;
             _game.AddCardToHand(_playerId, CardType.EVENT, card, discardedCard);
         }
     }
     SetPlayerScreen();
 }
Exemplo n.º 2
0
 private void AddCharacterCardToHand(CharacterCard card)
 {
     if (!_game.AddCardToHand(_playerId, CardType.CHARACTER, card))
     {
         var swapCards = new SwapCardForm(card, _game.GetPlayersCharacterCards(_playerId), CardType.CHARACTER);
         swapCards.ShowDialog();
         if (swapCards.DialogResult == DialogResult.OK)
         {
             var discardedCard = (CharacterCard)swapCards.CardToBeRemoved;
             _game.AddCardToHand(_playerId, CardType.CHARACTER, card, discardedCard);
         }
     }
     SetPlayerScreen();
 }