public NewGameCommandHandler(IDocumentStore documentStore, IGameGenerator gameGenerator, IPlayerMarksGenerator playerMarksGenerator, IGuidProvider guidProvider)
 {
     _documentStore        = documentStore ?? throw new ArgumentNullException(nameof(documentStore));
     _gameGenerator        = gameGenerator ?? throw new ArgumentNullException(nameof(gameGenerator));
     _playerMarksGenerator = playerMarksGenerator ?? throw new ArgumentNullException(nameof(playerMarksGenerator));
     _guidProvider         = guidProvider ?? throw new ArgumentNullException(nameof(guidProvider));
 }
        public Game Get(int numberOfSmalls, int numberOfBigs)
        {
            _gameGenerator = new GameGenerator();
            var result = _gameGenerator.Get(numberOfSmalls, numberOfBigs);

            return(result);
        }
        public Game Get(int numberOfSmalls, int numberOfBigs)
        {
            _gameGenerator = new GameGenerator();
            var result = _gameGenerator.Get(numberOfSmalls, numberOfBigs);

            return result;
        }
Ejemplo n.º 4
0
        public SudokuUserControl(
            IGameGenerator sudokuGenerator,
            IGameSolver sudokuSolver)
        {
            if (sudokuGenerator == null || sudokuSolver == null)
            {
                throw new ArgumentNullException("SudokuGenerator or sudokuSolver is null!");
            }

            this.sudokuGenerator = sudokuGenerator;
            this.sudokuSolver    = sudokuSolver;
        }
 public void TearDown()
 {
     gameGenerator = null;
 }
 public void SetUp()
 {
    gameGenerator = new GameGenerator(); 
 }
 public void TearDown()
 {
     gameGenerator = null;
 }
 public void SetUp()
 {
     gameGenerator = new GameGenerator();
 }