Ejemplo n.º 1
0
 // TODO: Consider moving the call to _boardDiamondManager away from this class
 private void regenerateBoardObjects(Board board)
 {
     board.GameObjects = new List <BaseGameObject>();
     board.Diamonds    = _boardDiamondManager.GenerateDiamondsIfNeeded(board);
     _boardObjectGenerator?
     .getCurrentObjectGenerators()
     .ForEach(gog =>
              board.GameObjects.AddRange(gog.RegenerateObjects(board)));
 }
Ejemplo n.º 2
0
        private void regenerateBoardObjects(Board board)
        {
            board.GameObjects = new List <BaseGameObject>();
            board.Diamonds    = _diamondGeneratorService.GenerateDiamondsIfNeeded(board);
            if (_gameObjectGeneratorService == null)
            {
                return;
            }
            var list =
                _gameObjectGeneratorService
                .getCurrentObjectGenerators()
                .SelectMany(
                    gog =>
                    gog.RegenerateObjects(board))
                .ToList();

            board.GameObjects = list;
        }