Exemplo n.º 1
0
  def __init__(self, scenario='blankworld.xml'):
    # compatibility
    self.version = '0.1'
    self.OS = {}
    
    # Initialize all sorts of variables
    # The root node of the order of battle
    self.OOB = []
  
    # The Database daemon
    self.data = sandbox_data_server()
    
    # communication net
    # The communication stack
    self.COMMnets = {}
    
    # Each unit gets it own UID, this is the counter that keeps track of this
    self.next_uid = 1

    # A list of ongoing maneuver battles.
    self.engagements = []
    
    # A register of counter-battery units [ uid , uid, ...] 
    self.counterbattery = []
    self.sead = []
    
    #Strikes counter measures
    self.SEADMisions = []
    self.CounterBtyMissions = []
    self.strikeQueue = []
    
    # Infrastructure
    self.network = sandbox_network()
    
    # Clock
    self.clock = datetime.today()
    self.pulse = timedelta(minutes = 10.0)
    self.lastpulse = datetime.today()
    
    # Scheduler
    self.scheduler = sandbox_Scheduler()
    
    # Sides registration (rgb colors)
    self.sides = {}
    
    # Load the Scenario definition
    self.LoadFromFile(scenario)
Exemplo n.º 2
0
 def setUp(self):
   import sandbox_data
   self.database = sandbox_data.sandbox_data_server()
   
   os.chdir
Exemplo n.º 3
0
    def setUp(self):
        import sandbox_data
        self.database = sandbox_data.sandbox_data_server()

        os.chdir