def test_move_conversion_right(self): move = core.RIGHT np.testing.assert_array_equal(core.RIGHT, trainer.to_move(0, move)) np.testing.assert_array_equal(core.UP, trainer.to_move(1, move)) np.testing.assert_array_equal(core.DOWN, trainer.to_move(2, move))
def test_move_conversion_oob(self): self.assertIsNone(trainer.to_move(3, core.UP))
def test_move_conversion_down(self): move = core.DOWN np.testing.assert_array_equal(core.DOWN, trainer.to_move(0, move)) np.testing.assert_array_equal(core.RIGHT, trainer.to_move(1, move)) np.testing.assert_array_equal(core.LEFT, trainer.to_move(2, move))