コード例 #1
0
 public IPlayersManager ToTwoPlayer(IPlayer playerOne, IPlayer playerTwo)
 => new PlayersManager(
     new PlayersQuantityType(new Players(_genericMixStrategy.Mix(new List <IPlayer>
 {
     playerOne, playerTwo
 }))), _racingCardManager,
     _genericMixStrategy);
コード例 #2
0
        public RacingCardManager(IRacingCardsFactory racingCardsFactory,
                                 IGenericMixStrategy mixStrategy,
                                 IMixDiscartCards mixDiscartCards)
        {
            var listOfRacingCards = racingCardsFactory.Create();

            _cards           = RacingCards.Create(mixStrategy.Mix(listOfRacingCards));
            _mixDiscartCards = mixDiscartCards;
        }
コード例 #3
0
        public IPlayersManagerSecondStep GiveBetCards(IReadOnlyCollection <IBetCard> beatsCards)
        {
            if (beatsCards == null || beatsCards.Count != 5)
            {
                throw new ArgumentException(nameof(beatsCards));
            }

            _players.GiveCards(_mixStrategy.Mix(beatsCards.ToList()).ToList());
            return(this);
        }
コード例 #4
0
 public IReadOnlyCollection <ITrack> MixTracks(List <ITrack> tracksToMix) => _genericMixStrategy.Mix(tracksToMix);