def test_returns_zero_when_non_normalised_angles_are_equivalent(self): self.assertEquals(0, Game.angle_difference(380, -340))
def test_returns_correct_value_when_difference_is_small_negative_but_angles_not_normalised(self): self.assertEquals(-20, Game.angle_difference(410, -330))
def test_returns_zero_when_angles_are_the_same(self): self.assertEquals(0, Game.angle_difference(45, 45))
def test_returns_correct_value_when_difference_is_negative_and_crosses_wrap(self): self.assertEquals(-20, Game.angle_difference(10, 350))
def test_returns_correct_value_when_difference_is_positive_and_crosses_wrap(self): self.assertEquals(20, Game.angle_difference(350, 10))
def test_returns_correct_value_when_difference_is_small_negative(self): self.assertEquals(-20, Game.angle_difference(50, 30))
def test_returns_correct_value_when_difference_is_small_positive(self): self.assertEquals(20, Game.angle_difference(30, 50))
def test_returns_correct_value_when_difference_is_small_positive_but_angles_not_normalised(self): self.assertEqual(20, Game.angle_difference(-330, 410))