Exemplo n.º 1
0
 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);
 }
Exemplo n.º 3
0
 public TetrisEvaluator(IGameOrchestrator gameOrchestrator, bool demoMode)
 {
     this.gameOrchestrator = gameOrchestrator ?? throw new ArgumentNullException(nameof(gameOrchestrator));
     this.demoMode         = demoMode;
 }
Exemplo n.º 4
0
 public HomeController()
 {
     _gameOrchestrator = GetNewGameOrchestrator();
 }
Exemplo n.º 5
0
 public HomeController(IGameOrchestrator gameOrchestrator)
 {
     _gameOrchestrator = gameOrchestrator;
 }