Exemplo n.º 1
0
    public static float ComputeChanceForProblemGeneric(InteriorProblemType type)
    {
        float totalOdds = 0f;

        totalOdds += 100f;
        totalOdds += 100f;
        totalOdds += 100f;
        totalOdds += 100f;
        totalOdds += 100f;

        return(100f / totalOdds);
    }
Exemplo n.º 2
0
    public float ComputeChanceForProblem(InteriorProblemType type)
    {
        Dictionary <InteriorProblemType, float> dict = GetProblemOddsDictionary();

        float totalOdds = 0f;

        totalOdds += dict[InteriorProblemType.None];
        totalOdds += dict[InteriorProblemType.Debris];
        totalOdds += dict[InteriorProblemType.Steam];
        totalOdds += dict[InteriorProblemType.Flame];
        totalOdds += dict[InteriorProblemType.Breach];

        return(dict[type] / totalOdds);
    }
Exemplo n.º 3
0
    public float GetProblemOdds(InteriorProblemType type)
    {
        Dictionary <InteriorProblemType, float> dict = GetProblemOddsDictionary();

        return(dict[type]);
    }