本文整理汇总了Python中rule.Rule.gameOver方法的典型用法代码示例。如果您正苦于以下问题:Python Rule.gameOver方法的具体用法?Python Rule.gameOver怎么用?Python Rule.gameOver使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rule.Rule
的用法示例。
在下文中一共展示了Rule.gameOver方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Brd
# 需要导入模块: from rule import Rule [as 别名]
# 或者: from rule.Rule import gameOver [as 别名]
#test = Brd(0x220,0x8400)
#test = Brd(0x20A, 0x440)
#test = Brd(0x620,0x4004)
#test = Brd(0x8200, 0x4800)
#test = Brd(0x2A0, 0x108)
#test = Brd(0x8220, 0xA)
test.paintbrd()
'''
result = max(test, depth = 5)
moveb(brd = test, *result[0]);
test.paintbrd()
'''
while True:
if Rule.gameOver(test):
break
else:
result = itDeep(test, depth = 7, type = "max")
moveb(brd = test, *result);
print('-'*50)
test.paintbrd()
if Rule.gameOver(test):
break
result = itDeep(test, depth = 7, type = "min")
movew(brd = test, *result);
print('-'*50)
test.paintbrd()