Пример #1
0
        public IMinefield create_a_mindfield_with_these_options(GameOptions game_options, Guid game_id)
        {
            var grid = _grid_factory.create_grid_with_size_of(game_options.game_difficulty.minefield_size,
                                                                          game_id);

            var mine_planter = _mine_planter_factory.create_for(game_options.game_difficulty);

            mine_planter.plant_mines_on(grid);

            var minefield = new Minefield(grid, _mine_clearer);

            // TODO: Move this to inside the constructor?
            // DomainEvent.raise(new MinefieldCreatedFor(_game_id, minefield));

            return minefield;
        }
        public IMinefield create_a_mindfield_with_these_options(GameOptions game_options, Guid game_id)
        {
            var grid = _grid_factory.create_grid_with_size_of(game_options.game_difficulty.minefield_size,
                                                              game_id);

            var mine_planter = _mine_planter_factory.create_for(game_options.game_difficulty);

            mine_planter.plant_mines_on(grid);

            var minefield = new Minefield(grid, _mine_clearer);

            // TODO: Move this to inside the constructor?
            // DomainEvent.raise(new MinefieldCreatedFor(_game_id, minefield));

            return(minefield);
        }