//Helper functions start //--------------------------------------------------------- //--------------------------------------------------------- /// <summary> /// MeasureAllGames is called when all games end. It will call methods of /// evaluating scores for all abilities. /// </summary> private static void MeasureAllGames() { // Measure abilities for Balloons // If the game has been played, do the measurement; else don't do the measurement if (!notYetPlayBalloons) { PointingMeasure.EvaluateBalloonsScore(); SelectiveVisualMeasure.EvaluateBalloonsScore(); InhibitionMeasure.EvaluateBalloonsScore(); } // Measure abilities for Squares // If the game has been played, do the measurement; else don't do the measurement if (!notYetPlaySquares) { SelectiveVisualMeasure.EvaluateSquaresScore(); VisuospatialSketchpadMeasure.EvaluateSquaresScore(); } // Measure abilities for Catch The Thief // If the game has been played, do the measurement; else don't do the measurement if (!notYetPlayCTF) { InhibitionMeasure.EvaluateCTFScore(); SelectiveVisualMeasure.EvaluateCTFScore(); } // Measure abilities for ImageHit // If the game has been played, do the measurement; else don't do the measurement if (!notYetPlayImageHit) { ObjectRecognitionMeasure.EvaluateImageHitScore(); InhibitionMeasure.EvaluateImageHitScore(); SelectiveVisualMeasure.EvaluateImageHitScore(); } // Measure abilities for Catch The Ball // If the game has been played, do the measurement; else don't do the measurement if (!notYetCatchTheBall) { TimeToContact.EvaluateCatchTheBallScore(); } // Measure abilities for Save One Ball // If the game has been played, do the measurement; else don't do the measurement if (!notYetSaveOneBall) { TimeToContact.EvaluateSaveOneBallScore(); } // Measure abilities for Judge The Ball // If the game has been played, do the measurement; else don't do the measurement if (!notYetJudgeTheBall) { TimeToContact.EvaluateJudgeTheBallScore(); } }
public IEnumerator WHEN_EvaluateBalloonsScoreFunctionCalled_BalloonsSubScoreDerived() { ClearSelectiveVisualMeasure(); // Call tested function SelectiveVisualMeasure.EvaluateBalloonsScore(); yield return(null); Assert.AreEqual(AbilityName.SELECTIVE_VISUAL, SelectiveVisualMeasure.subScoreBalloons.AbilityName); Assert.AreEqual(GameName.BALLOONS, SelectiveVisualMeasure.subScoreBalloons.GameName); Assert.AreEqual(0, SelectiveVisualMeasure.subScoreBalloons.Score); Assert.AreEqual(2, SelectiveVisualMeasure.subScoreBalloons.Weight); }
public IEnumerator TestBalloonsScore_MoveTimeIsTimeInClicks() { ClearSelectiveVisualMeasure(); // Add balloonRound to balloonsData SelectiveVisualMeasure.balloonsData.Rounds.Add(balloonRound); // Call Evaluate function SelectiveVisualMeasure.EvaluateBalloonsScore(); int score_normal = SelectiveVisualMeasure.subScoreBalloons.Score; ClearSelectiveVisualMeasure(); // Add balloonRound_longTimeInClicks to balloonsData SelectiveVisualMeasure.balloonsData.Rounds.Add(balloonRound_longTimeInClicks); // Call Evaluate function SelectiveVisualMeasure.EvaluateBalloonsScore(); int score_longTimeInClicks = SelectiveVisualMeasure.subScoreBalloons.Score; yield return(null); // Test that long destination click time should result a lower score Assert.IsTrue(score_normal > score_longTimeInClicks); }
public IEnumerator TestBalloonsScore_ShortestPossibleDestinationClickTime() { ClearSelectiveVisualMeasure(); // Add balloonRound to balloonsData SelectiveVisualMeasure.balloonsData.Rounds.Add(balloonRound); // Call Evaluate function SelectiveVisualMeasure.EvaluateBalloonsScore(); int score_normal = SelectiveVisualMeasure.subScoreBalloons.Score; ClearSelectiveVisualMeasure(); // Add balloonRound_shortestPossibleDestClickTime to balloonsData SelectiveVisualMeasure.balloonsData.Rounds.Add(balloonRound_shortestPossibleDestClickTime); // Call Evaluate function SelectiveVisualMeasure.EvaluateBalloonsScore(); int score_shortestDesClickTime = SelectiveVisualMeasure.subScoreBalloons.Score; yield return(null); // Test that shortest possible destination click time should result a higher score Assert.IsTrue(score_normal < score_shortestDesClickTime); }