コード例 #1
0
    //generate the sick stages randomly
    private static void GenerateRandomStage()
    {
        int randomNumber = Random.Range(0, 3);

        switch (randomNumber)
        {
        case 0: CurrentStage = AsthmaStage.OK; break;

        case 1: CurrentStage = AsthmaStage.Sick; break;

        case 2: CurrentStage = AsthmaStage.Attack; break;
        }
    }
コード例 #2
0
 //check if the stage chosen by the user is correct
 public static bool IsThisStageCorrect(AsthmaStage asthmaStage)
 {
     return(asthmaStage.Equals(CurrentStage));
 }