From c29599466386b6cf8b613038838b9cec2d6e72af Mon Sep 17 00:00:00 2001
From: Bahil Botond <dxwbw9@inf.elte.hu>
Date: Wed, 27 Apr 2022 18:36:52 +0200
Subject: [PATCH] Commented issues fixed

---
 Assets/Scripts/Logic/Data/GameTeam.cs             | 2 +-
 Assets/Scripts/Logic/Data/World/WorldGenerator.cs | 6 +++---
 Assets/Scripts/LogicTests/GameOverviewTest.cs     | 1 -
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/Assets/Scripts/Logic/Data/GameTeam.cs b/Assets/Scripts/Logic/Data/GameTeam.cs
index 1cba592..9cc9214 100644
--- a/Assets/Scripts/Logic/Data/GameTeam.cs
+++ b/Assets/Scripts/Logic/Data/GameTeam.cs
@@ -55,7 +55,7 @@ public class GameTeam {
 		Overview = overview;
 		TeamColor = color;
 		Castle = castle;
-		Barracks = new List<Barrack>(barracks).OrderBy(barrack => barrack.Ordinal).ToList();
+		Barracks = barracks.OrderBy(barrack => barrack.Ordinal).ToList();
 		Money = overview.EconomyConfig.StartingBalance;
 	}
 
diff --git a/Assets/Scripts/Logic/Data/World/WorldGenerator.cs b/Assets/Scripts/Logic/Data/World/WorldGenerator.cs
index a35ba34..7e65c8f 100644
--- a/Assets/Scripts/Logic/Data/World/WorldGenerator.cs
+++ b/Assets/Scripts/Logic/Data/World/WorldGenerator.cs
@@ -79,17 +79,17 @@ internal class WorldGenerator {
 		}
 
 		if (i == 0) {
-			List<int> goodindeces = new List<int>();
+			List<int> goodIndices = new List<int>();
 			for (int j = 0; j < _width; j++) {
 				tp = new TilePosition(_height / 2, _width);
 				if (!occupiedList.Where(building => !(building is Obstacle))
 					.Any(occupied => occupied.Position.FirstNormDistance(tp) < 4)) {
-					goodindeces.Add(j);
+					goodIndices.Add(j);
 				}
 			}
 
 			occupiedList.Add(_constructors.CreateObstacle(new TilePosition(
-				goodindeces[_random.Next() % goodindeces.Count],
+				goodIndices[_random.Next() % goodIndices.Count],
 				_height / 2)));
 		}
 
diff --git a/Assets/Scripts/LogicTests/GameOverviewTest.cs b/Assets/Scripts/LogicTests/GameOverviewTest.cs
index c32e7b5..44b07a6 100644
--- a/Assets/Scripts/LogicTests/GameOverviewTest.cs
+++ b/Assets/Scripts/LogicTests/GameOverviewTest.cs
@@ -43,7 +43,6 @@ public class GameOverviewTest {
 	}
 
 	[Test]
-	[Repeat(100)]
 	public void TestFightingPhaseHasLimitedTime() {
 		GameOverview overview = GameTestUtils.CreateOverview();
 
-- 
GitLab