List <int> GetJoyRowCounts(IsLuckyModePredicate pred, MachineTestLuckyMode mode, SpinResultType resultType, List <MachineTestRoundResult> roundResults)
    {
        int        rowCount = MachineTestUtility.GetJoyRowCount(_machineConfig, mode, resultType);
        List <int> result   = new List <int>(rowCount);

        for (int i = 0; i < rowCount; i++)
        {
            result.Add(0);
        }

        foreach (var r in roundResults)
        {
            if (pred(r) && r._output._spinResult.Type == resultType)
            {
                int id = r._output._spinResult.GetJoyId();
                if (id > result.Count)
                {
                    Debug.LogError("index out of range");
                    Debug.Assert(false);
                }
                ++result[id - 1];
            }
        }

        return(result);
    }
    List <float> GetJoyRowProbDeviations(MachineTestLuckyMode mode, SpinResultType resultType, List <float> rowProbs)
    {
        int          joyRowCount = MachineTestUtility.GetJoyRowCount(_machineConfig, mode, resultType);
        List <float> result      = new List <float>(joyRowCount);

        for (int i = 0; i < rowProbs.Count; i++)
        {
            float expectProb = MachineTestUtility.GetJoyOverallHit(_machineConfig, mode, resultType, i);
            float v          = rowProbs[i] - expectProb;
            result.Add(v);
        }
        return(result);
    }