Ejemplo n.º 1
0
 public Boxes(CardSet deck,
              Action <Player> selectActivePlayer,
              Action <Player> selectPassivePlayer,
              Action <string> showMessage,
              params Player[] players)
 {
     Deck = deck;
     SelectActivePlayer  = selectActivePlayer;
     SelectPassivePlayer = selectPassivePlayer;
     Message             = showMessage;
     Players             = new List <Player>(players);
     ActivePlayer        = players[0];
 }
Ejemplo n.º 2
0
        public CardSet Deal(int amount)
        {
            CardSet c = new CardSet();

            if (amount > Cards.Count)
            {
                amount = Cards.Count;
            }

            for (int i = 0; i < amount; i++)
            {
                c.Add(Cards[0]);
                Cards.RemoveAt(0);
            }

            return(c);
        }
 public GraphicsPlayer(string name, CardSet cardSet, Label labelName) : base(name, cardSet)
 {
     LabelName      = labelName;
     labelName.Text = name;
 }
Ejemplo n.º 4
0
 public Player(string name, CardSet cardSet) : this(name)
 {
     PlayerCards = cardSet;
 }
Ejemplo n.º 5
0
 public void Add(CardSet cards)
 {
     Add(cards.Cards.ToArray());
 }