public GameEngine(IGameController gameController, IGameboardGenerator fieldGenerator, IDetonationPatternFactory detonationFactory) { this.gameController = gameController; int size = this.gameController.GetPlaygroundSizeFromUser(); double minesPercentage = this.DetermineMinesPercentage(); this.board = fieldGenerator.Generate(size, minesPercentage); this.board.SetDetonationFactory(detonationFactory); this.blownMines = 0; }
public GameEngine(IGameController gameController, IGameboardGenerator fieldGenerator, IDetonationPatternFactory detonationFactory) { this.gameController = gameController; int size = this.gameController.GetPlaygroundSizeFromUser(); double minesPercentage = this.DetermineMinesPercentage(); this.board = fieldGenerator.Generate(size, minesPercentage); this.board.SetDetonationFactory(detonationFactory); this.blownMines = 0; }