private string ConstructResult(int id, MachineTestInput input, MachineTestOutput output) { CoreSpinResult spinResult = output._spinResult; SpinResultType spinResultType = spinResult.Type; List <string> symbolNames = ListUtility.MapList(spinResult.SymbolList, (CoreSymbol s) => { return(s.SymbolData.Name); }); string symbolNameStr = string.Join(_delimiter, symbolNames.ToArray()); int resultType = CoreUtility.SpinResultTypeToInt(spinResultType); int resultId = 0; if (spinResultType == SpinResultType.Win) { resultId = spinResult.GetPayoutId(); } else if (spinResultType == SpinResultType.NearHit) { resultId = spinResult.GetNearHitId(); } int lucky = CoreUtility.LuckyModeToInt(spinResult.LuckyMode); long curCredit = input._credit; int consumedBetAmount = (int)spinResult.ConsumedBetAmount; float winRatio = spinResult.WinRatio; long creditChange = output._creditChange; long remainCredit = output._remainCredit; int luckyChange = output._luckyChange; int remainLucky = output._remainLucky; int isRespin = spinResult.IsRespin ? 1 : 0; List <string> isFixedStrList = ListUtility.MapList(spinResult.IsFixedList, (bool b) => { return(b ? "1" : "0"); }); string isFixedStr = string.Join(_delimiter, isFixedStrList.ToArray()); int isTriggerIndieGame = output._isTriggerIndieGame ? 1 : 0; ulong indieGameWinAmount = output._indieGameWinAmount; string indieGameCustomData = output._indieGameCustomData; string result = string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{15},{16}", id, symbolNameStr, resultType, resultId, lucky, curCredit, consumedBetAmount, winRatio, creditChange, remainCredit, luckyChange, remainLucky, isRespin, isFixedStr, isTriggerIndieGame, indieGameWinAmount, indieGameCustomData); return(result); }