Beispiel #1
0
        public string Play()
        {
            Deck deck = new Deck();

            string result = "<h3>Dealing cards ...</h3>";
            result +=   deck.Deal(_player1, _player2);

            result += "<h3>Begin Battle...</h3>";
            int round = 0;

            while (_player1.Cards.Count != 0 && _player2.Cards.Count != 0)
            {
                Battle battle = new Battle();
                result += battle.PerformBattle(_player1, _player2);

                round++;
                if (round>20)
                    break;
            }
            result += determineWinner();
            return result;
        }
Beispiel #2
0
 public string Play()
 {
     Deck deck = new Deck();
     return deck.Deal(_player1, _player2);
 }