Beispiel #1
0
 public GameOfWarService(
     ILogger <GameOfWarService> logger,
     IConfiguration config,
     IDealCardsService dealCardsService,
     IWinnerService winnerService,
     IPlayerFactory playerFactory,
     IWarService warService, IDrawService drawService)
 {
     _logger           = logger;
     _config           = config;
     _dealCardsService = dealCardsService;
     _winnerService    = winnerService;
     _playerFactory    = playerFactory;
     _warService       = warService;
     _drawService      = drawService;
 }
Beispiel #2
0
        public Game(
            IDealCardsService dealCardsService,
            IWinnerService winnerService,
            IPlayerFactory playerFactory,
            IWarService warService,
            IDrawService drawService,
            Func <string> inputProvider,
            Action <string> outputProvider,
            int playerCount)
        {
            _dealCardsService = dealCardsService;
            _winnerService    = winnerService;
            _inputProvider    = inputProvider;
            _outputProvider   = outputProvider;
            _drawService      = drawService;
            _warService       = warService;

            Players = playerFactory.CreatePlayers(playerCount);
        }