public void TestMethod1() { var rouletteController = new RouletteController(_rouletteService, _betsService, Configuration); ActionResult <List <RouletteDto> > datos = rouletteController.Get(); Assert.IsNotNull(datos); }
// Start is called before the first frame update void Start() { this.rewardedAd = new RewardedAd(adUnitId); //インスタンス生成 // Create an empty ad request. AdRequest request = new AdRequest.Builder().Build(); // Load the rewarded ad with the request. this.rewardedAd.LoadAd(request); // Called when an ad request has successfully loaded. this.rewardedAd.OnAdLoaded += HandleRewardedAdLoaded; // Called when an ad request failed to load. this.rewardedAd.OnAdFailedToLoad += HandleRewardedAdFailedToLoad; // Called when an ad is shown. this.rewardedAd.OnAdOpening += HandleRewardedAdOpening; // Called when an ad request failed to show. this.rewardedAd.OnAdFailedToShow += HandleRewardedAdFailedToShow; // Called when the user should be rewarded for interacting with the ad. this.rewardedAd.OnUserEarnedReward += HandleUserEarnedReward; // Called when the ad is closed. this.rewardedAd.OnAdClosed += HandleRewardedAdClosed; RouletteControllerInstance = GameObject.Find("RouletteMasu").GetComponent <RouletteController>(); UIControllerInstance = GameObject.Find("Main Camera").GetComponent <UIController>(); }
static async Task MainSearchAsync() { int initialWallet = 28000; int simulationCount = 0; var results = new ConcurrentDictionary <double, SimulationResult>(); var simulationRunner = new SimulationRunner(); timer = new Timer((e) => { try { AnalyzeResults(results.ToList(), simulationCount); Console.WriteLine($"Saved at {simulationCount} runs"); } catch (Exception ex) { Console.WriteLine(ex); } }, null, TimeSpan.FromMilliseconds(5000), TimeSpan.FromMilliseconds(5000)); var games = await simulationRunner.LoadGames(new DateTime(2018, 09, 13, 22, 30, 0), new DateTime(2018, 09, 14, 6, 30, 0)).ConfigureAwait(false); games = games.OrderBy(g => g.Id).ToList(); Console.WriteLine("launching Foreach"); Parallel.ForEach(Enumerable.Range(1, 10000000), new ParallelOptions { MaxDegreeOfParallelism = 8 }, (count) => { var controllerSettings = GenerateRandomControllerSettings(); simulationCount++; simulationRunner = new SimulationRunner(); var player = new Player() { Wallet = 45000 }; var controller = new RouletteController( player, controllerSettings.BaseBet, controllerSettings.Target, controllerSettings.Multiplier, controllerSettings.PassGames, controllerSettings.Reducer); simulationRunner.StartWith(player, controller, games); player.ComputeStats(); player.Bets.Clear(); var controllerResults = controller.GetControllerResults(); var simulationResult = new SimulationResult(controllerSettings, controllerResults, player, initialWallet); player.ControllerResults = controller.ToString(); results.TryAdd(simulationResult.TotalScore, simulationResult); }); }
//==============================================================================// // 初期化処理 // //==============================================================================// void Start() { RouletteController = GameObject.Find("RouletteMasu").GetComponent <RouletteController>(); SugorokuController = GameObject.Find("SugorokuMasu").GetComponent <SugorokuController>(); CoinEventController = GameObject.Find("EnterCoinGate").GetComponent <CoinEventController>(); generateInstance(); initRouletteStockLampInfo(); }
//==============================================================================// // 初期化処理 // //==============================================================================// void Start() { RouletteController = GameObject.Find("RouletteMasu").GetComponent <RouletteController>(); SugorokuController = GameObject.Find("SugorokuMasu").GetComponent <SugorokuController>(); CoinEventController = GameObject.Find("EnterCoinGate").GetComponent <CoinEventController>(); generateInstance(); initRouletteStockLampInfo(); outputRouletteLampDisplayState(); // ストックランプの表示状態の初期化 }
void Start() { this.remain = this.totalPlayers; this.players = new Player[this.totalPlayers]; this.roulette = GetComponent <RouletteController>(); // Notifier notifier = new Notifier(); notifier.Subscribe(Player.ON_DIE, HandleOnDie); notifier.Subscribe(RouletteController.ON_FINISH_SELECTED, HandleOnSelectedInfected); }
static async Task MainAsync() { int initialWallet = 45000; var results = new ConcurrentDictionary <ControllerSettings, Player>(); var simulationRunner = new SimulationRunner(); var games = await simulationRunner.LoadGames(new DateTime(2018, 09, 13, 22, 30, 0), new DateTime(2018, 09, 14, 6, 30, 0)).ConfigureAwait(false); games = games.OrderBy(g => g.Id).ToList(); simulationRunner = new SimulationRunner(); var player = new Player() { Wallet = initialWallet }; var controllerSettings = new ControllerSettings() { BaseBet = 4, Multiplier = 2.09, PassGames = 7, Reducer = 0.001, Target = 7 }; var controller = new RouletteController( player, controllerSettings.BaseBet, controllerSettings.Target, controllerSettings.Multiplier, controllerSettings.PassGames, controllerSettings.Reducer); simulationRunner.StartWith(player, controller, games); player.ComputeStats(); player.ControllerResults = controller.ToString(); var controllerResults = controller.GetControllerResults(); var simulationResult = new SimulationResult(controllerSettings, controllerResults, player, initialWallet); results.TryAdd(controllerSettings, player); Console.WriteLine(player); Console.WriteLine(controller); Console.WriteLine(simulationResult); }
void Start() { this.remain = this.totalPlayers; this.players = new Player[this.totalPlayers]; for (int i = 0; i < this.totalPlayers; i++) { Vector3 position = spawnPositions.GetChild(i).position; Quaternion rotation = Quaternion.identity; this.players[i] = Instantiate <Player>(playerPrefab, position, rotation); this.players[i].Number = i; this.players[i].Playable = i < numPlayers; this.players[i].UI = healthPanel.GetChild(i).GetComponent <PlayerUIController>(); } this.started = false; this.roulette = GetComponent <RouletteController>(); // Notifier notifier = new Notifier(); notifier.Subscribe(Player.ON_DIE, HandleOnDie); notifier.Subscribe(RouletteController.ON_FINISH_SELECTED, HandleOnSelectedInfected); }