private void SetParameters(GameParameters parameters) { var gameManager = (FrogsCounterGameManager)_gameManager; gameManager.IterationNumber = parameters.iterationNumber; gameManager.WaitTime = parameters.waitTime; gameManager.NormalSpeed = parameters.normalSpeed; gameManager.SpeedVariance = parameters.speedVariance; gameManager.ActiveFrogsNumber = parameters.activeFrogs; }
public override void IncreaseDifficulty(int round) { var gameManager = (FrogsCounterGameManager)_gameManager; if (_difficultyLevel < 5) { _difficultyLevel++; } gameManager.IterationNumber++; GameParameters parameters = new GameParameters(0, 0, 0, 0, 0); switch (_difficultyLevel) { case 0: parameters = new GameParameters(8, 1.7F, 0.4F, 0.045F, 1); break; case 1: parameters = new GameParameters(10, 1.5F, 0.5F, 0.045F, 1); break; case 2: parameters = new GameParameters(14, 1.4F, 0.55F, 0.05F, 2); break; case 3: parameters = new GameParameters(16, 1.2F, 0.61F, 0.055F, 2); break; case 4: parameters = new GameParameters(20, 1F, 0.67F, 0.06F, 3); break; case 5: parameters = new GameParameters(22, 0.8F, 0.72F, 0.064F, 3); break; } SetParameters(parameters); }