示例#1
0
 def test_id_white(self):
     game = Game()
     expected_id = np.zeros(33)
     expected_id[32] = 1
     expected_id[:12] = np.ones(12)
     expected_id[20:32] = np.full(shape=12, fill_value=2)
     self.assertTrue(np.array_equal(game.id(), expected_id))
示例#2
0
 def test_id_black(self):
     game = Game()
     game = game.move(game.get_possible_moves()[0])
     expected_id = np.zeros(33)
     expected_id[32] = 2
     expected_id[:13] = np.ones(13)
     expected_id[8] = 0
     expected_id[20:32] = np.full(shape=12, fill_value=2)
     self.assertTrue(np.array_equal(game.id(), expected_id))