int GetSpinCountBeforeLuckyZero(List <MachineTestRoundResult> roundResults) { int index = ListUtility.Find(roundResults, (MachineTestRoundResult r) => { return(r._input._lucky == 0); }); return(index); }
int GetSpinCountBeforeReachLuckyThreshold(List <MachineTestRoundResult> roundResults) { int threshold = CoreConfig.Instance.LuckyConfig.LongLuckyThreshold; int index = ListUtility.Find(roundResults, (MachineTestRoundResult r) => { return(r._input._lucky < threshold); }); return(index); }
string BasicValueFromKey(BasicData[] dataArray, string key) { string result = ""; int index = ListUtility.Find(dataArray, (BasicData data) => { return(data.Key == key); }); if (index >= 0) { result = dataArray[index].Val; } return(result); }
public void UpdateGenConfigToTestConfig(MachineSeedGenConfig genConfig, MachineTestConfig testConfig, bool isCheckMachineName) { testConfig._initLucky = genConfig._initLucky; testConfig._initCredit = genConfig._initCredit; testConfig._spinCount = genConfig._spinCount; testConfig._betMode = genConfig._betMode; testConfig._spinCount = genConfig._spinCount; testConfig._betMode = genConfig._betMode; testConfig._betAmount = genConfig._betAmount; testConfig._betPercentage = genConfig._betPercentage; testConfig._minBetAmountInPercentageMode = genConfig._minBetAmountInPercentageMode; testConfig._stopCredit = genConfig._stopCredit; testConfig._userCount = genConfig._userCount; testConfig._seedMode = genConfig._seedMode; testConfig._startSeedForFixedMode = genConfig._startSeedForFixedMode; testConfig._isPayProtectionEnable = genConfig._isPayProtectionEnable; if (isCheckMachineName) { if (testConfig._allMachines.Contains(genConfig._machineName)) { int index = ListUtility.Find(testConfig._allMachines, (string name) => { return(name == genConfig._machineName); }); Debug.Assert(index >= 0 && index < testConfig._allMachines.Length); testConfig._selectMachines[index] = true; } else { Debug.LogError("machineName is wrong: " + genConfig._machineName); } } }