Exemple #1
0
        public TrucoDeck(TrucoDeckType type)
            : base()
        {
            PrepareTrucoDeck(type);

             

        }
Exemple #2
0
        private void PrepareTrucoDeck(TrucoDeckType type)
        {
            IEnumerable<Card> invalidCards;
            if (type == TrucoDeckType.Short)
                invalidCards = this.Where(c => new int[] { 4, 5, 6, 7, 8, 9, 10 }.Contains(c.Value));
            else
                invalidCards = this.Where(c => new int[] { 8, 9, 10 }.Contains(c.Value));

            IEnumerable<Card> validCards = this.Except(invalidCards);
            this.Clear();
            this.AddRange(validCards);
        }
Exemple #3
0
        private void PrepareTrucoDeck(TrucoDeckType type)
        {
            IEnumerable <Card> invalidCards;

            if (type == TrucoDeckType.Short)
            {
                invalidCards = this.Where(c => new int[] { 4, 5, 6, 7, 8, 9, 10 }.Contains(c.Value));
            }
            else
            {
                invalidCards = this.Where(c => new int[] { 8, 9, 10 }.Contains(c.Value));
            }

            IEnumerable <Card> validCards = this.Except(invalidCards);

            this.Clear();
            this.AddRange(validCards);
        }
Exemple #4
0
 public Game(Player p1, Player p2, Player p3, Player p4, TrucoDeckType gameType)
     : this(p1, p2, gameType)
 {
     P3 = p3;
     P4 = p4;
 }
Exemple #5
0
 public Game(Player p1, Player p2, TrucoDeckType gameType)
 {
     P1 = p1;
     P2 = p2;
     Deck = new TrucoDeck(gameType);
 }
Exemple #6
0
 public TrucoDeck(TrucoDeckType type)
     : base()
 {
     PrepareTrucoDeck(type);
 }
Exemple #7
0
 public Game(Player p1, Player p2, Player p3, Player p4, TrucoDeckType gameType)
     : this(p1, p2, gameType)
 {
     P3 = p3;
     P4 = p4;
 }
Exemple #8
0
 public Game(Player p1, Player p2, TrucoDeckType gameType)
 {
     P1   = p1;
     P2   = p2;
     Deck = new TrucoDeck(gameType);
 }