예제 #1
0
 def test_slow_closure(self):
     expected = [
         "     D++",
         "B/C (A+) E/F",
         "     A--",
         ">2/8 to evade",
         "0:8 8",
         "1:1 8",
         "1:2 7",
         "1:3 6",
         "1:4 5",
         "1:5 3",
         "1:6 3",
         "1:7 1",
         "1:8 1",
         "2:1 0",
         "2:2 HIT",
         "RoC: 1",
     ]
     self.assertEqual(
         '\n'.join(expected),
         avt.shellstar(avt.Vector("4D 1E 7-"),
                       avt.Vector("12D 4C 9-"),
                       24,
                       segment=8))
예제 #2
0
 def test_vertical_impact_window(self):
     expected = [
         "(---)",
         "Evade in Amber Ring",
         ">1/3 to evade",
         "+0 8",
         "+1 5",
         "+2 2",
         "+3 HIT",
         "RoC: 3",
     ]
     self.assertEqual(
         '\n'.join(expected),
         avt.shellstar(avt.Vector("4D 1E 7+"), avt.Vector("12A 3C"), 20))
예제 #3
0
 def test_standstill(self):
     expected = [
         "   +++",
         "F (D/E) C",
         "   ---",
         ">2/6 to evade",
         "+0 17",
         "+1 14",
         "+2 11",
         "+3 8",
         "+4 5",
         "+5 2",
         "+6 HIT",
         "RoC: 3",
     ]
     self.assertEqual(
         '\n'.join(expected),
         avt.shellstar(avt.Vector("13A 5B 4-"), avt.Vector(""), 24))
예제 #4
0
 def test_orthagonal(self):
     expected = [
         "   +++",
         "E (C/D) B",
         "   ---",
         ">1/5 to evade",
         "0:4 13",
         "0:5 10",
         "0:6 7",
         "0:7 4",
         "0:8 1",
         "1:1 HIT",
         "RoC: 3",
     ]
     self.assertEqual(
         '\n'.join(expected),
         avt.shellstar(avt.Vector("13A"),
                       avt.Vector("3E 3F"),
                       24,
                       segment=4))
예제 #5
0
 def test_run_away(self):
     to_target = avt.Vector("6a")
     target_v = avt.Vector("26a")
     self.assertEqual("No Shot", avt.shellstar(to_target, target_v, 24))