/// <summary> /// FillAllGameData is to update game data objects with corresponding raw gameplay data. /// It will only get gameplay data for the games that have been played. /// </summary> public void FillAllGameData() { // Get gameplay data for Balloons // If the game has been played, get the gameplay data; else, skip this game if (!notYetPlayBalloons) { balloonsData = Balloons.GetGameplayData(); } // Get gameplay data for Squares // If the game has been played, get the gameplay data; else, skip this game if (!notYetPlaySquares) { squaresData = Squares.GetGameplayData(); } // Get gameplay data for Catch The Thief // If the game has been played, get the gameplay data; else, skip this game if (!notYetPlayCTF) { ctfData = CatchTheThief.GetGameplayData(); } // Get gameplay data for ImageHit // If the game has been played, get the gameplay data; else, skip this game if (!notYetPlayImageHit) { imageHitData = ImageHit.GetGameplayData(); } // Get gameplay data for Catch The Ball // If the game has been played, get the gameplay data; else, skip this game if (!notYetCatchTheBall) { catchTheBallData = CatchTheBall.GetGameplayData(); } // Get gameplay data for Save One Ball // If the game has been played, get the gameplay data; else, skip this game if (!notYetSaveOneBall) { saveOneBallData = SaveOneBall.GetGameplayData(); } // Get gameplay data for Judge The Ball // If the game has been played, get the gameplay data; else, skip this game if (!notYetJudgeTheBall) { judgeTheBallData = JudgeTheBall.GetGameplayData(); } }
public void ObjectsAreSemanticallyEquivalent() { JudgeTheBallStorage storage1 = new JudgeTheBallStorage { TargetRadius = DUMMY_TARGET_RADIUS, Rounds = new List <JudgeTheBallStorage.BallRound> { new JudgeTheBallStorage.BallRound { SlowBallActualTimeToContact = 5.3F, PlayerBallActualTimeToContact = 6.0F, FastBallActualTimeToContact = 7, InitialSlowBallRadius = 3.9F, InitialPlayerBallRadius = 3.9F, InitialFastBallRadius = 3.9F, PredictedTimeToContact = 6.8F }, new JudgeTheBallStorage.BallRound { SlowBallActualTimeToContact = 6.3F, PlayerBallActualTimeToContact = 7, FastBallActualTimeToContact = 7.5F, InitialSlowBallRadius = 7.4F, InitialPlayerBallRadius = 7.4F, InitialFastBallRadius = 7.4F, PredictedTimeToContact = 6.2F }, new JudgeTheBallStorage.BallRound { SlowBallActualTimeToContact = 9.2F, PlayerBallActualTimeToContact = 9.6F, FastBallActualTimeToContact = 10, InitialSlowBallRadius = 4, InitialPlayerBallRadius = 4, InitialFastBallRadius = 4, PredictedTimeToContact = 9.2F }, } }; JudgeTheBallStorage storage2 = new JudgeTheBallStorage { TargetRadius = DUMMY_TARGET_RADIUS, Rounds = new List <JudgeTheBallStorage.BallRound> { new JudgeTheBallStorage.BallRound { SlowBallActualTimeToContact = 5.3F, PlayerBallActualTimeToContact = 6.0F, FastBallActualTimeToContact = 7, InitialSlowBallRadius = 3.9F, InitialPlayerBallRadius = 3.9F, InitialFastBallRadius = 3.9F, PredictedTimeToContact = 6.8F }, new JudgeTheBallStorage.BallRound { SlowBallActualTimeToContact = 6.3F, PlayerBallActualTimeToContact = 7, FastBallActualTimeToContact = 7.5F, InitialSlowBallRadius = 7.4F, InitialPlayerBallRadius = 7.4F, InitialFastBallRadius = 7.4F, PredictedTimeToContact = 6.2F }, new JudgeTheBallStorage.BallRound { SlowBallActualTimeToContact = 9.2F, PlayerBallActualTimeToContact = 9.6F, FastBallActualTimeToContact = 10, InitialSlowBallRadius = 4, InitialPlayerBallRadius = 4, InitialFastBallRadius = 4, PredictedTimeToContact = 9.2F }, } }; Assert.AreEqual(storage1, storage2); }