//
//  Base.swift
//  GoldWars
//
//  Created by Marcel Schwarz on 18.04.20.
//  Copyright © 2020 SP2. All rights reserved.
//

import SpriteKit
import GameplayKit

class Base : GKEntity {
    var unitCount: Int
    var adjacencyList: Array<Base>
    
    init(position: CGPoint, team: Team! = nil) {
        self.unitCount = 0
        self.adjacencyList = [Base]()
        
        super.init()
        
        addComponent(DefaultBaseComponent(texture: SKTexture(imageNamed: "Base"), position: position))
        if(team != nil){
            addComponent(TeamComponent(team: team!, position: position))
            self.unitCount = 100
        }
    }
    
    
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
