Skip to content

Commit

Permalink
2022.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
JeniquePeters committed Aug 21, 2022
1 parent 55e88df commit 42ce4d1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion game-engine/Engine/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# - deploy

variables:
ENGINE_VERSION: 2022.3.8
ENGINE_VERSION: 2022.3.9
# DOCKER_REGISTRY: NOT_SET
# REGION: $AWS_DEFAULT_REGION

Expand Down
3 changes: 1 addition & 2 deletions game-engine/Engine/Services/TerritoryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ private bool PositionIsClaimable(Position position)
private void CreateNewLand(BotObject bot, Position position)
{
var containedNode = worldStateService.NodeByPosition(position);
var land = new Land(position, bot.BotId, containedNode.Id);

if (containedNode == null)
{
Logger.LogInfo("CreateNewLand", $"Contained Node is null when trying to add land at position X:{position.X} Y:{position.Y}");
return;
}

var land = new Land(position, bot.BotId, containedNode.Id);
LandByPosition[containedNode.Position] = land;
LandByNodeId[containedNode.Id] = land;
AddOccupantsToLand(land, bot, 0);
Expand All @@ -147,7 +147,6 @@ private List<AvailableNode> CreateAvailableNodes(BotObject bot, List<Position> t
var positionsInUse = worldStateService.GetPositionsInUse();
var availablePositionsInTerritory = territoryPositions.Where(position => !positionsInUse.Contains(position)).ToList();
var availableNodes = availablePositionsInTerritory.Select(position => new AvailableNode(position){MaxUnits = 10 /*Is this necessary??*/}).ToList();
positionsInUse.UnionWith(availablePositionsInTerritory);

worldStateService.AddAvailableNodes(availableNodes);
bot.AddAvailableNodeIds(availableNodes.Select(node => node.Id));
Expand Down
6 changes: 5 additions & 1 deletion game-engine/Engine/Services/WorldStateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ public void RemoveAvailableNode(Guid availableNodeId)
public void AddAvailableNodes(List<AvailableNode> buildingNodes)
{
state.World.Map.AvailableNodes.AddRange(buildingNodes);
buildingNodes.ForEach(node => NodesByPosition[node.Position] = node);
buildingNodes.ForEach(node =>
{
NodesByPosition[node.Position] = node;
positionsInUse.Add(node.Position);
});
}

public Position GetNextBotPosition()
Expand Down
2 changes: 1 addition & 1 deletion game-engine/GameRunner/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# - deploy

variables:
RUNNER_VERSION: 2022.3.8
RUNNER_VERSION: 2022.3.9
# DOCKER_REGISTRY: NOT_SET
# REGION: $AWS_DEFAULT_REGION

Expand Down
2 changes: 1 addition & 1 deletion game-engine/Logger/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# - deploy

variables:
LOGGER_VERSION: 2022.3.8
LOGGER_VERSION: 2022.3.9
# DOCKER_REGISTRY: NOT_SET
# REGION: $AWS_DEFAULT_REGION

Expand Down

0 comments on commit 42ce4d1

Please sign in to comment.