diff --git a/GoldWars/GoldWars/Entities/Base.swift b/GoldWars/GoldWars/Entities/Base.swift index 0455210..6ae0a10 100644 --- a/GoldWars/GoldWars/Entities/Base.swift +++ b/GoldWars/GoldWars/Entities/Base.swift @@ -15,7 +15,7 @@ class Base : GKEntity { init(position: CGPoint, team: Team! = nil) { self.unitCount = 0 - self.adjacencyList = Array() + self.adjacencyList = [Base]() super.init() diff --git a/GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift b/GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift index a390f83..beff433 100644 --- a/GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift +++ b/GoldWars/GoldWars/Map/TwoPlayerDefaultTestMap.swift @@ -69,7 +69,7 @@ class TwoPlayerDefaultTestMap: MapProtocol { basePlayerTwo.adjacencyList.append(contentsOf: column3) - // Add Bases to GameScene + // Register bases with the EntityManager entityManager.add(basePlayerOne) column1.forEach({base in entityManager.add(base)}) diff --git a/GoldWars/GoldWars/Scenes/GameScene.swift b/GoldWars/GoldWars/Scenes/GameScene.swift index 7e03378..678b327 100644 --- a/GoldWars/GoldWars/Scenes/GameScene.swift +++ b/GoldWars/GoldWars/Scenes/GameScene.swift @@ -33,7 +33,6 @@ class GameScene: SKScene{ } } - // TODO: Issue #24 create Map generation Service func initMap() { MapFactory(scene: self, entityManager: self.entityManager).loadMap(playerCount: 2) }