本文整理汇总了Python中chess.board.Board.move_algebraic方法的典型用法代码示例。如果您正苦于以下问题:Python Board.move_algebraic方法的具体用法?Python Board.move_algebraic怎么用?Python Board.move_algebraic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类chess.board.Board
的用法示例。
在下文中一共展示了Board.move_algebraic方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Board
# 需要导入模块: from chess.board import Board [as 别名]
# 或者: from chess.board.Board import move_algebraic [as 别名]
from py_uci import UCIEngine
from chess.board import Board
b = Board()
b.move_algebraic("e4")
b.move_algebraic("c5")
b.move_algebraic("Nf3")
b.move_algebraic("d6")
b.move_algebraic("d4")
b.move_algebraic("cxd4")
b.move_algebraic("Nxd4")
b.move_algebraic("Nf6")
b.move_algebraic("Nc3")
b.move_algebraic("a6")
b.move_algebraic("g4")
e = UCIEngine(multi_pv=10)
e.new_game()
e.set_position(moves=b.get_moves())
e.find_best_move(10000)
print b
示例2: Board
# 需要导入模块: from chess.board import Board [as 别名]
# 或者: from chess.board.Board import move_algebraic [as 别名]
import sys
sys.path.append("..")
from py_uci import UCIEngine
from chess.board import Board
b = Board()
b.move_algebraic("e4")
b.move_algebraic("e5")
b.move_algebraic("Nf3")
b.move_algebraic("Nc6")
b.move_algebraic("Bc4")
b.move_algebraic("h6")
b.move_algebraic("O-O")
b.move_algebraic("Bc5")
b.move_algebraic("c3")
b.move_algebraic("Nf6")
b.move_algebraic("d4")
b.move_algebraic("exd4")
b.move_algebraic("cxd4")
b.move_algebraic("Bb6")
b.move_algebraic("e5")
b.move_algebraic("Nh7")
b.move_algebraic("d5")
b.move_algebraic("Ne7")
b.move_algebraic("d6")
b.move_algebraic("Nc6")
#b.move_algebraic("Bxf7")
#b.move_algebraic("Kxf7")
#b.move_algebraic("dxc7")
#b.move_algebraic("Qxc7")