Beispiel #1
0
 public Game(Random random)
 {
     Deck = new Deck(random);
     Player1 = new Hand();
     Player2 = new Hand();
     Rounds = 20;
     _bounty = new List<Card>();
 }
Beispiel #2
0
 public string ListPlayerHand(Hand player)
 {
     string result = "";
     foreach (Card card in player.Cards)
     {
         result += String.Format("&nbsp;&nbsp;{0}<br/>", card.ToString());
     }
     return result;
 }
Beispiel #3
0
 public string DisplayPlayerCardTotals(Hand player)
 {
     return String.Format("<b>Player 1: {0}</b><br/><b>Player 2: {1}</b>", Player1.Cards.Count, Player2.Cards.Count);
 }
Beispiel #4
0
 private string rakeCards(Hand winner)
 {
     string result = "";
     foreach (Card card in _bounty)
     {
         result += "&nbsp;&nbsp;" + card.ToString() + "<br/>";
         winner.AddCard(card);
     }
     _bounty = new List<Card>();
     return result;
 }