예제 #1
0
        public Player(string name)
        {
            Name          = name ?? throw new ArgumentNullException(nameof(name));
            Purse         = new Pool();
            Nobles        = new List <Noble>();
            ReservedCards = new List <Card>();
            CardsInPlay   = new List <Card>();

            Bonuses       = GetDiscount();
            Budget        = Bonuses.MergeWith(Purse);
            VictoryPoints = GetVictoryPoints();
        }
예제 #2
0
        private Player(string name,
                       IPool purse,
                       IReadOnlyCollection <Card> reservedCards,
                       IReadOnlyCollection <Card> cardsInPlay,
                       IReadOnlyCollection <Noble> nobles)
        {
            Name          = name;
            Purse         = purse ?? throw new ArgumentNullException(nameof(purse));
            ReservedCards = reservedCards ?? throw new ArgumentNullException(nameof(reservedCards));
            CardsInPlay   = cardsInPlay ?? throw new ArgumentNullException(nameof(cardsInPlay));
            Nobles        = nobles ?? throw new ArgumentNullException(nameof(nobles));

            Bonuses       = GetDiscount();
            Budget        = Bonuses.MergeWith(Purse);
            VictoryPoints = GetVictoryPoints();
        }