Exemplo n.º 1
0
 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"))
Exemplo n.º 2
0
    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()
Exemplo n.º 3
0
 def __init__(self, configProvider):
     self._Consts = Constants()
     self._ConfigProvider = configProvider
Exemplo n.º 4
0
 def __init__(self, filename):
     self._filename = filename
     self._Csvreader = CSVMatrixReader()
     self._Valid = self._Csvreader.parse(filename)
     self._Consts = Constants()
     self._LosCalculator = LosCalculator()
Exemplo n.º 5
0
 def __init__(self,path):
     self._Constants=Constants()
     self._Path=path
     self._Valid=False
     self._Initialize()
Exemplo n.º 6
0
 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"))
Exemplo n.º 7
0
 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()