public static float ComputeChanceForProblemGeneric(InteriorProblemType type) { float totalOdds = 0f; totalOdds += 100f; totalOdds += 100f; totalOdds += 100f; totalOdds += 100f; totalOdds += 100f; return(100f / totalOdds); }
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); }
public float GetProblemOdds(InteriorProblemType type) { Dictionary <InteriorProblemType, float> dict = GetProblemOddsDictionary(); return(dict[type]); }