/// <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() { SaveOneBallStorage storage1 = new SaveOneBallStorage { TargetRadius = DUMMY_TARGET_RADIUS, Rounds = new List <SaveOneBallStorage.BallRound> { new SaveOneBallStorage.BallRound { LeftActualTimeToContact = 5.3F, RightActualTimeToContact = 3.5F, DidPredictFirstArrivingBall = true, InitialLeftBallRadius = 3.9F, InitialRightBallRadius = 3.9F, PredictedTimeToContact = 6.8F }, new SaveOneBallStorage.BallRound { LeftActualTimeToContact = 6.3F, RightActualTimeToContact = 3.6F, DidPredictFirstArrivingBall = false, InitialLeftBallRadius = 7.4F, InitialRightBallRadius = 7.4F, PredictedTimeToContact = 6.2F }, new SaveOneBallStorage.BallRound { LeftActualTimeToContact = 9.2F, RightActualTimeToContact = 2.9F, DidPredictFirstArrivingBall = true, InitialLeftBallRadius = 4, InitialRightBallRadius = 4, PredictedTimeToContact = 9.2F }, } }; SaveOneBallStorage storage2 = new SaveOneBallStorage { TargetRadius = DUMMY_TARGET_RADIUS, Rounds = new List <SaveOneBallStorage.BallRound> { new SaveOneBallStorage.BallRound { LeftActualTimeToContact = 5.3F, RightActualTimeToContact = 3.5F, DidPredictFirstArrivingBall = true, InitialLeftBallRadius = 3.9F, InitialRightBallRadius = 3.9F, PredictedTimeToContact = 6.8F }, new SaveOneBallStorage.BallRound { LeftActualTimeToContact = 6.3F, RightActualTimeToContact = 3.6F, DidPredictFirstArrivingBall = false, InitialLeftBallRadius = 7.4F, InitialRightBallRadius = 7.4F, PredictedTimeToContact = 6.2F }, new SaveOneBallStorage.BallRound { LeftActualTimeToContact = 9.2F, RightActualTimeToContact = 2.9F, DidPredictFirstArrivingBall = true, InitialLeftBallRadius = 4, InitialRightBallRadius = 4, PredictedTimeToContact = 9.2F }, } }; Assert.AreEqual(storage1, storage2); }