コード例 #1
0
ファイル: CasinoHand.cs プロジェクト: prescottbreeden/casino
 /// <summary>
 /// Removes a card from the hand and adds it to the bottom of a target deck.
 /// </summary>
 /// <param name="card">reference to Card obj to discard from hand.</param>
 /// <param name="fromDeck">reference to Deck obj to discard the card to.</param>
 public void DiscardCard(Card card, Deck toDeck)
 {
     Cards.Remove(card);
     toDeck.AddBottom(card);
 }
コード例 #2
0
ファイル: CasinoHand.cs プロジェクト: prescottbreeden/casino
 /// <summary>
 /// Adds a card to Cards List from target deck.
 /// </summary>
 /// <param name="fromDeck">reference to Deck obj to draw card from</param>
 public void DrawCard(Deck fromDeck)
 {
     Cards.Add(fromDeck.RemoveTop());
 }