public TetrisAI(IGameOrchestrator gameOrchestrator, Action <uint> onNewGen, Action <INetworkDefinition> onNewBestNetwork, bool load) { this.gameOrchestrator = gameOrchestrator ?? throw new ArgumentNullException(nameof(gameOrchestrator)); tetrisEvaluator = new TetrisEvaluator(gameOrchestrator, false); evolutionAlgorithm = CreateEvolutionAlgorithm(load); this.onNewGen = onNewGen; this.onNewBestNetwork = onNewBestNetwork; }
public void SetUp() { _randomNumberGeneratorService = new RandomNumberGeneratorService(); _handMovementService = new HandMovementService(_randomNumberGeneratorService); _handsPlayFactory = new HandsPlayFactory(_handMovementService); _gamePlayerFactory = new GamePlayerFactory(); _handsPlayResolverService = new HandsPlayResolverService(); _gameOrchestrator = new GameOrchestrator(_gamePlayerFactory, _handsPlayFactory, _handsPlayResolverService); }
public TetrisEvaluator(IGameOrchestrator gameOrchestrator, bool demoMode) { this.gameOrchestrator = gameOrchestrator ?? throw new ArgumentNullException(nameof(gameOrchestrator)); this.demoMode = demoMode; }
public HomeController() { _gameOrchestrator = GetNewGameOrchestrator(); }
public HomeController(IGameOrchestrator gameOrchestrator) { _gameOrchestrator = gameOrchestrator; }