def test_step_LEFT(self): kaa = Snake(self.head_xy, self.bod_len) expected_coord = [-1, 0] actual_coord = kaa.step(kaa.head, kaa.LEFT) self.assertTrue(np.array_equal(expected_coord, actual_coord))
def test_step_DOWN(self): kaa = Snake(self.head_xy, self.bod_len) expected_coord = [0, 1] actual_coord = kaa.step(kaa.head, kaa.DOWN) self.assertTrue(np.array_equal(expected_coord, actual_coord))