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


Python AC_RowStack.acceptsCards方法代码示例

本文整理汇总了Python中pysollib.stack.AC_RowStack.acceptsCards方法的典型用法代码示例。如果您正苦于以下问题:Python AC_RowStack.acceptsCards方法的具体用法?Python AC_RowStack.acceptsCards怎么用?Python AC_RowStack.acceptsCards使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pysollib.stack.AC_RowStack的用法示例。


在下文中一共展示了AC_RowStack.acceptsCards方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: acceptsCards

# 需要导入模块: from pysollib.stack import AC_RowStack [as 别名]
# 或者: from pysollib.stack.AC_RowStack import acceptsCards [as 别名]
 def acceptsCards(self, from_stack, cards):
     if not AC_RowStack.acceptsCards(self, from_stack, cards):
         return False
     if not self.cards:
         return (from_stack is self.game.s.talon or
                 from_stack in self.game.s.reserves)
     return True
开发者ID:jimsize,项目名称:PySolFC,代码行数:9,代码来源:bristol.py

示例2: acceptsCards

# 需要导入模块: from pysollib.stack import AC_RowStack [as 别名]
# 或者: from pysollib.stack.AC_RowStack import acceptsCards [as 别名]
 def acceptsCards(self, from_stack, cards):
     if not AC_RowStack.acceptsCards(self, from_stack, cards):
         return False
     if (from_stack in self.game.s.reserves or
             from_stack in self.game.s.foundations):
         return False
     return True
开发者ID:shlomif,项目名称:PySolFC,代码行数:9,代码来源:katzenschwanz.py

示例3: acceptsCards

# 需要导入模块: from pysollib.stack import AC_RowStack [as 别名]
# 或者: from pysollib.stack.AC_RowStack import acceptsCards [as 别名]
 def acceptsCards(self, from_stack, cards):
     if not self.basicAcceptsCards(from_stack, cards):
         return 0
     stackcards = self.cards
     if stackcards:
         if (stackcards[-1].suit == 4 or cards[0].suit == 4):
             return stackcards[-1].rank == cards[0].rank + 1
     return AC_RowStack.acceptsCards(self, from_stack, cards)
开发者ID:jimsize,项目名称:PySolFC,代码行数:10,代码来源:hexadeck.py

示例4: acceptsCards

# 需要导入模块: from pysollib.stack import AC_RowStack [as 别名]
# 或者: from pysollib.stack.AC_RowStack import acceptsCards [as 别名]
 def acceptsCards(self, from_stack, cards):
     if not AC_RowStack.acceptsCards(self, from_stack, cards):
         return False
     if not self.cards and from_stack is self.game.s.waste:
         for stack in self.game.s.reserves:
             if stack.cards:
                 return False
         return True
     if from_stack in self.game.s.rows and \
             len(cards) != len(from_stack.cards):
         return False
     return True
开发者ID:voyageur,项目名称:PySolFC,代码行数:14,代码来源:glenwood.py

示例5: acceptsCards

# 需要导入模块: from pysollib.stack import AC_RowStack [as 别名]
# 或者: from pysollib.stack.AC_RowStack import acceptsCards [as 别名]
 def acceptsCards(self, from_stack, cards):
     if self.game.getState() == 0:
         return False
     if from_stack in self.game.s.reserves:
         return False
     return AC_RowStack.acceptsCards(self, from_stack, cards)
开发者ID:shlomif,项目名称:PySolFC,代码行数:8,代码来源:terrace.py

示例6: acceptsCards

# 需要导入模块: from pysollib.stack import AC_RowStack [as 别名]
# 或者: from pysollib.stack.AC_RowStack import acceptsCards [as 别名]
 def acceptsCards(self, from_stack, cards):
     if not AC_RowStack.acceptsCards(self, from_stack, cards):
         return False
     # Note that this reserve stack accepts sequences if both
     # the reserve stack and the Talon are empty.
     return len(self.cards) == 0 and len(self.game.s.talon.cards) == 0
开发者ID:jimsize,项目名称:PySolFC,代码行数:8,代码来源:gypsy.py

示例7: acceptsCards

# 需要导入模块: from pysollib.stack import AC_RowStack [as 别名]
# 或者: from pysollib.stack.AC_RowStack import acceptsCards [as 别名]
 def acceptsCards(self, from_stack, cards):
     if self.cards and not self.cards[-1].face_up:
         return True
     return AC_RowStack.acceptsCards(self, from_stack, cards)
开发者ID:shlomif,项目名称:PySolFC,代码行数:6,代码来源:fortythieves.py

示例8: acceptsCards

# 需要导入模块: from pysollib.stack import AC_RowStack [as 别名]
# 或者: from pysollib.stack.AC_RowStack import acceptsCards [as 别名]
 def acceptsCards(self, from_stack, cards):
     if not AC_RowStack.acceptsCards(self, from_stack, cards):
         return False
     if from_stack in self.game.s.reserves:
         return False
     return True
开发者ID:shlomif,项目名称:PySolFC,代码行数:8,代码来源:tournament.py

示例9: acceptsCards

# 需要导入模块: from pysollib.stack import AC_RowStack [as 别名]
# 或者: from pysollib.stack.AC_RowStack import acceptsCards [as 别名]
 def acceptsCards(self, from_stack, cards):
     if not AC_RowStack.acceptsCards(self, from_stack, cards):
         return False
     return BritishConstitution_RowStackMethods.acceptsCards(
         self, from_stack, cards)
开发者ID:shlomif,项目名称:PySolFC,代码行数:7,代码来源:royalcotillion.py


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