本文整理汇总了Python中engine.Engine.showboard方法的典型用法代码示例。如果您正苦于以下问题:Python Engine.showboard方法的具体用法?Python Engine.showboard怎么用?Python Engine.showboard使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类engine.Engine
的用法示例。
在下文中一共展示了Engine.showboard方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Monkey
# 需要导入模块: from engine import Engine [as 别名]
# 或者: from engine.Engine import showboard [as 别名]
p2 = Monkey(2) # AI - can do play_move() and gen_move()
p1.logger = logger
p2.logger = logger
# create engine
engine = Engine()
# create board of default size 19
board = Board(19)
# attach everything
engine.board = board
engine.set_players(p1, p2)
engine.logger = logger
p1.engine = engine
p2.engine = engine
# create gtp_parser
gtp = GTP(engine, logger, in_file)
# start reading commands from in_file
if not do_human:
gtp.run()
else:
players = ["black", "white"]
p = 0
while True:
engine.showboard()
engine.genmove(players[p])
p = (p + 1) % 2