示例#1
0
 def test_alertLv1(self):
     main = MainClass()
     testAircraft = Aircraft(60000, 60000, 8000, 50, 30, 40, 0, 1)
     testAircraft.calcAlertLevel(main.ownShip)
     self.assertEquals(testAircraft.getAlertLevel(), 1)
示例#2
0
 def test_alertLv3(self):
     main = MainClass()
     testAircraft = Aircraft(0, 35000, 2500, 180, 0, 200, 0, 1)
     testAircraft.calcAlertLevel(main.ownShip)
     self.assertEquals(testAircraft.getAlertLevel(), 3)
def do_compare_a_to_b(own_ship: Aircraft, aircraft_a: Aircraft,
                      aircraft_b: Aircraft):
    aircraft_a.calcAlertLevel(own_ship)
    aircraft_b.calcAlertLevel(own_ship)

    return aircraft_a.comparePriority(aircraft_b)
 def test_alertLv1(self):
     main = MainClass()
     testAircraft = Aircraft(60000,60000,8000,50,30,40,0,1)
     testAircraft.calcAlertLevel(main.ownShip)
     self.assertEquals(testAircraft.getAlertLevel(), 1)
 def test_alertLv3(self):
     main = MainClass()
     testAircraft = Aircraft(0,35000,2500,180,0,200,0,1)
     testAircraft.calcAlertLevel(main.ownShip)
     self.assertEquals(testAircraft.getAlertLevel(), 3)
示例#6
0
def do_compare_a_to_b(own_ship: Aircraft, aircraft_a: Aircraft,
                      aircraft_b: Aircraft):
    aircraft_a.calcAlertLevel(own_ship)
    aircraft_b.calcAlertLevel(own_ship)

    return aircraft_a.comparePriority(aircraft_b)