Esempio n. 1
0
 def getStateFromBoard(cls, board):
     state = cls()
     for key in board:
         node = Node.getCopiedNode(board[key])
         state.board[key] = node
         if board[key].color == cc.WHITE:
             state.wList.insertNode(node)
             if node.pType == cc.KING:
                 state.isWhiteKingAlive = True
         else:
             state.bList.insertNode(node)
             if node.pType == cc.KING:
                 state.isBlackKingAlive = True
     return state