diff --git a/GoldWars/GoldWars/Entities/Base.swift b/GoldWars/GoldWars/Entities/Base.swift index e8384bd..7fce8e0 100644 --- a/GoldWars/GoldWars/Entities/Base.swift +++ b/GoldWars/GoldWars/Entities/Base.swift @@ -14,9 +14,9 @@ class Base: GKEntity { var unitCount: Int var adjacencyList: Array - var changeOwnerShip: Bool + var changeOwnerShip: Bool var ownerShipPlayer: GKPlayer? - + init(position: CGPoint, player: GKPlayer! = nil, team: Team! = nil) { self.unitCount = 0 self.adjacencyList = [Base]() @@ -31,7 +31,7 @@ class Base: GKEntity { } } - func attackBase(base: Base, units:Int) -> [GKEntity]{ + func attackBase(base: Base, units:Int) -> [GKEntity]{ base.changeOwnerShip = true base.ownerShipPlayer = self.ownerShipPlayer self.unitCount -= units