当前位置: 首页>>代码示例>>Python>>正文


Python Rule.gameOver方法代码示例

本文整理汇总了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()        
开发者ID:coolcooleric,项目名称:siding,代码行数:32,代码来源:main.py


注:本文中的rule.Rule.gameOver方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。