Ejemplo n.º 1
0
 public override bool EndCurrentTrial()
 {
     if (CurrentTrainingLevel <= MaxTrainingLevels)
     {
         CurrentTrainingLevel++;
         CurrentTrial.Close();
         return(false);
     }
     return(base.EndCurrentTrial());
 }
Ejemplo n.º 2
0
 public virtual bool EndCurrentTrial()
 {
     CurrentTrial.Close();
     return(false);
 }
Ejemplo n.º 3
0
    public override bool EndCurrentTrial()
    {
        var trial = CurrentTrial as SelectionTrial;

        if (trial.Answer == ITrial.AnswerType.CORRECT && CurrentLevel >= StartLevel)
        {
            points++;
        }

        if (trial.Answer != ITrial.AnswerType.CORRECT && CurrentLevel < StartLevel)
        {
            points--;
        }

        //1st iteration
        if (CurrentLevel == StartLevel)
        {
            CurrentLevel++;
        }
        //2nd iteration
        else if (CurrentLevel == StartLevel + 1)
        {
            var prevTrial = Trials[Trials.Count - 2] as SelectionTrial;
            if (trial.Answer == ITrial.AnswerType.CORRECT && prevTrial.Answer == ITrial.AnswerType.CORRECT)
            {
                CurrentLevel = StartLevel + 2;
            }
            else
            {
                CurrentLevel = StartLevel - 1;
            }
        }
        //begin backwards movement
        else if (CurrentLevel == StartLevel - 1)
        {
            CurrentLevel--;
        }
        //continue backwards movement
        else if (CurrentLevel < StartLevel - 1)
        {
            var prevTrial = Trials[Trials.Count - 2] as SelectionTrial;
            if (trial.Answer == ITrial.AnswerType.CORRECT && prevTrial.Answer == ITrial.AnswerType.CORRECT)
            {
                CurrentLevel = StartLevel + 2;
            }
            else
            {
                CurrentLevel--;
            }
        }
        //forward movement
        else
        {
            var trial2 = Trials[Trials.Count - 2] as SelectionTrial;
            var trial3 = Trials[Trials.Count - 3] as SelectionTrial;
            if (trial.Answer != ITrial.AnswerType.CORRECT && trial2.Answer != ITrial.AnswerType.CORRECT && trial3.Answer != ITrial.AnswerType.CORRECT)
            {
                CurrentTrial.Close();
                return(true);
            }
            else
            {
                CurrentLevel++;
            }
        }
        return(base.EndCurrentTrial());
    }