def __init__(self,configProvider): self._GraphLoaded = False self._Consts=Constants() self._ConfigProvider=configProvider self._MovementCalculator=MovementCalculator(configProvider) self._Csvreader=CSVMatrixReader() self._LosCalculator = LosCalculator() self._GraphLoaded=False self._DrawGraphs=bool(self._ConfigProvider.getValue('Game.Config', 'DrawMapHolderGraph').lower() in ("true"))
def setUp(self): self._RealPath = os.path.join(os.path.dirname(__file__), '../Maps/TestMap/Map.csv') self._SimpleRealPath = os.path.join(os.path.dirname(__file__), '../Maps/TestSimpleMap/Map.csv') self._NotRealPath = os.path.join(os.path.dirname(__file__), '../Maps/NoMap/Map.csv') self._NoControllingPointsMap = os.path.join( os.path.dirname(__file__), '../Maps/TestSimpleMap/Map.csv') self._ConfigProvider = UnitTestDummyConfigProvider() self._ConfigProvider.addValue('Game.Config', 'DrawMapHolderGraph', 'False') self._ConfigProvider.addValue('Game.MovementDefinations', 'maximumAllowedPath', '3') self._Consts = Constants()
def __init__(self, configProvider): self._Consts = Constants() self._ConfigProvider = configProvider
def __init__(self, filename): self._filename = filename self._Csvreader = CSVMatrixReader() self._Valid = self._Csvreader.parse(filename) self._Consts = Constants() self._LosCalculator = LosCalculator()
def __init__(self,path): self._Constants=Constants() self._Path=path self._Valid=False self._Initialize()
def __init__(self,mapholder:MapHolder,configprovider:ConfigProvider): self._mapHolder=mapholder self._Consts=Constants() self._ConfigProvider=configprovider self._ThreatTimeOut= int(self._ConfigProvider.getValue("Threat.Config", "ThreatTimeOut")) self._ThreatAltDiff = int(self._ConfigProvider.getValue("Threat.Config", "ThreatAltDiff"))
def __init__(self,configProvider:ConfigProvider): self._Configuration=configProvider self._Constants=Constants() self._Record=bool(self._Configuration.getValue('Recording','record').lower() in ("true")) if self._Record: self._Initialize()