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


Python PLocalizer.getPlayingCardName方法代码示例

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


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

示例1: getCardName

# 需要导入模块: from pirates.piratesbase import PLocalizer [as 别名]
# 或者: from pirates.piratesbase.PLocalizer import getPlayingCardName [as 别名]
def getCardName(value):
    if value == Unknown:
        return PLocalizer.PlayingCardUnknown
    else:
        rank = value % 13
        suit = value / 13
        return PLocalizer.getPlayingCardName(suit, rank)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:9,代码来源:PlayingCardGlobals.py

示例2: cardRankSelection

# 需要导入模块: from pirates.piratesbase import PLocalizer [as 别名]
# 或者: from pirates.piratesbase.PLocalizer import getPlayingCardName [as 别名]
 def cardRankSelection(self, rank):
     self.rank = rank
     card_id = self.suit * 13 + self.rank
     self.hideButtonArray(self.suitButtonArray)
     self.hideButtonArray(self.rankButtonArray)
     self.cancelButton.hide()
     self.table.card_id = card_id
     suit = card_id / 13
     rank = card_id % 13
     card = -1
     hand = self.table.getLocalAvatarHand()
     if hand:
         if self.cardSwapIndex == PlayingCardGlobals.Cheat1:
             if len(hand) >= 1:
                 card = hand[0]
             
         
         if self.cardSwapIndex == PlayingCardGlobals.Cheat2:
             if len(hand) >= 2:
                 card = hand[1]
             
         
         if self.cardSwapIndex == PlayingCardGlobals.Cheat7:
             if len(hand) >= 7:
                 card = hand[6]
             
         
     
     if card >= 0 and card < 52:
         original_suit = card / 13
         original_rank = card % 13
         string = PLocalizer.PokerSwapConfirmMessage % (PLocalizer.getPlayingCardName(original_suit, original_rank), PLocalizer.getPlayingCardName(suit, rank))
         self.swapDialog = PDialog.PDialog(text = string, style = OTPDialog.YesNo, giveMouse = False, command = self.swapCallback)
         self.table.setDialogBin(self.swapDialog)
         position = self.swapDialog.getPos()
         position.setZ(position[2] + 0.34999999999999998)
         self.swapDialog.setPos(position)
开发者ID:Puggyblue999,项目名称:PiratesOfTheCarribeanOnline,代码行数:39,代码来源:TableGUI.py


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