Skip to content
Snippets Groups Projects
Commit c2959946 authored by Bahil Botond's avatar Bahil Botond :pregnant_woman_tone2:
Browse files

Commented issues fixed

parent 2de44dbd
No related branches found
No related tags found
1 merge request!89Barrack spawn offset added (closes #88 and #116)
Pipeline #26964 passed
......@@ -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;
}
......
......@@ -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)));
}
......
......@@ -43,7 +43,6 @@ public class GameOverviewTest {
}
[Test]
[Repeat(100)]
public void TestFightingPhaseHasLimitedTime() {
GameOverview overview = GameTestUtils.CreateOverview();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment