private void StartNewGameModeGame() { var goalCaptureModeGame = new GameModel(selectedFormWidth, selectedFormHeight, ballsCount, playersCountSelection); goalCaptureModeGame.SetGameTime(selectedGametime); var goalCaptureModeForm = new GoalCaptureModeForm(goalCaptureModeGame); goalCaptureModeForm.ShowDialog(); }
public void Should_AddPointIfGoalCaptured() { var testGame = new GameModel(100, 100, 0, 1); var testForm = new GoalCaptureModeForm(testGame); var player = testGame.Players.First(); CreateNewZoneInGoalCaptureMode(testGame, player); Assert.AreEqual(1, player.Score); }
public void Should_SlowDownPlayerInSlowDownZone() { var testGame = new GameModel(100, 100, 0, 1); var testForm = new GoalCaptureModeForm(testGame); var player = testGame.Players.First(); while (testGame.SlowDownZones.Count < 1) { CreateNewZoneInGoalCaptureMode(testGame, player); } testGame.CheckSlowDownZones(); Assert.AreEqual(testGame.SlowDownZones.First().PlayerSpeedInsideZone, player.Speed); }
public void Should_IncreasePlayerSizeInSizeIncreaseZone() { var testGame = new GameModel(100, 100, 0, 1); var testForm = new GoalCaptureModeForm(testGame); var player = testGame.Players.First(); while (testGame.SizeIncreaseZones.Count < 1) { CreateNewZoneInGoalCaptureMode(testGame, player); } testGame.CheckSizeIncreaseZones(); Assert.AreEqual(testGame.SizeIncreaseZones.First().PlayerWidthIncreaseValue, player.Width); Assert.AreEqual(testGame.SizeIncreaseZones.First().PlayerHeightIncreaseValue, player.Height); }
public void Should_ChangeToOriginalPlayerSpeedAfterEscapingSlowDownZone() { var testGame = new GameModel(100, 100, 0, 1); var testForm = new GoalCaptureModeForm(testGame); var player = testGame.Players.First(); while (testGame.SlowDownZones.Count < 1) { CreateNewZoneInGoalCaptureMode(testGame, player); } testGame.CheckSlowDownZones(); player.SetPosition(player.OriginalPosition); testGame.CheckSlowDownZones(); Assert.AreEqual(player.OriginalSpeed, player.Speed); }
public void Should_ChangeToOrginalPlayerSizeAfterEscapingSizeIncreaseZone() { var testGame = new GameModel(100, 100, 0, 1); var testForm = new GoalCaptureModeForm(testGame); var player = testGame.Players.First(); while (testGame.SizeIncreaseZones.Count < 1) { CreateNewZoneInGoalCaptureMode(testGame, player); } testGame.CheckSizeIncreaseZones(); player.SetPosition(player.OriginalPosition); testGame.CheckSizeIncreaseZones(); Assert.AreEqual(player.OriginalWidth, player.Width); Assert.AreEqual(player.OriginalHeight, player.Height); }