/// <summary>
 ///     Makes a new game playing service.
 /// </summary>
 /// <exception cref="ArgumentNullException">
 ///     Thrown if any argument is null.
 /// </exception>
 public GamePlayingService(
     ICardDrawingService drawingService,
     ICardScoringService scoringService)
 {
     _drawingService = drawingService
                       ?? throw new ArgumentNullException(nameof(drawingService));
     _scoringService = scoringService
                       ?? throw new ArgumentNullException(nameof(scoringService));
 }
Пример #2
0
 public CardGameController(
     GameContext gameContext,
     ICardDrawingService drawingService,
     ICardScoringService scoringService,
     IGamePlayingService playingService,
     IGameHistoryService historyService)
 {
     _gameContext = gameContext
                    ?? throw new ArgumentNullException(nameof(gameContext));
     _drawingService = drawingService
                       ?? throw new ArgumentNullException(nameof(drawingService));
     _scoringService = scoringService
                       ?? throw new ArgumentNullException(nameof(scoringService));
     _playingService = playingService
                       ?? throw new ArgumentNullException(nameof(playingService));
     _historyService = historyService
                       ?? throw new ArgumentNullException(nameof(historyService));
 }