Example #1
0
 public abstract void Failure(Student s);
Example #2
0
        public bool EvaluateSkill(Student s)
        {
            bool answer = false;

            //evaluates the difficulty type and skill
            if (SetDifficulty == Difficulty.Easy)
            {
                Random rnd    = new Random();
                int    random = rnd.Next(1, 100);
                if (s.SetSkill == Skill.Novice)
                {
                    if (random < 90)
                    {
                        answer = true;
                    }
                }
                else if (s.SetSkill == Skill.Adept)
                {
                    answer = true;
                }
                else if (s.SetSkill == Skill.Master)
                {
                    answer = true;
                }
            }
            else if (SetDifficulty == Difficulty.Medium)
            {
                Random rnd    = new Random();
                int    random = rnd.Next(1, 100);
                if (s.SetSkill == Skill.Novice)
                {
                    if (random < 40)
                    {
                        answer = true;
                    }
                }
                else if (s.SetSkill == Skill.Adept)
                {
                    if (random < 80)
                    {
                        answer = true;
                    }
                }
                else if (s.SetSkill == Skill.Master)
                {
                    answer = true;
                }
            }
            else if (SetDifficulty == Difficulty.Hard)
            {
                Random rnd    = new Random();
                int    random = rnd.Next(1, 100);
                if (s.SetSkill == Skill.Novice)
                {
                    if (random < 10)
                    {
                        answer = true;
                    }
                }
                else if (s.SetSkill == Skill.Adept)
                {
                    if (random < 50)
                    {
                        answer = true;
                    }
                }
                else if (s.SetSkill == Skill.Master)
                {
                    answer = true;
                }
            }
            return(answer);
        }
Example #3
0
 public abstract void Success(Student s);