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


Python PLocalizer.getHandNameFull方法代码示例

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


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

示例1: setLocalAvatarHand

# 需要导入模块: from pirates.piratesbase import PLocalizer [as 别名]
# 或者: from pirates.piratesbase.PLocalizer import getHandNameFull [as 别名]
 def setLocalAvatarHand(self, cardValues):
     map(lambda card: card.hide(), self.localStatusPanel.hand)
     self.localStatusPanel.cardScaler.setScale(0.5)
     for (card, newValue) in zip(self.localStatusPanel.hand, cardValues):
         card.show()
         card.setValue(newValue)
         if newValue != PlayingCardGlobals.Unknown:
             card.turnUp()
             continue
     
     handNameLabel = self.localStatusPanel.handNameLabel
     communityCardValues = map(lambda card: card.getValue(), self.communityCards)
     if cardValues and PlayingCardGlobals.Unknown not in cardValues:
         if self.handId == PlayingCardGlobals.Nothing or self.sortedCards == None:
             handNameLabel.hide()
         else:
             handName = PLocalizer.getHandNameFull(self.table.handIdToHandCode(self.handId), self.sortedCards)
             handNameLabel['text'] = handName
             handNameLabel.show()
     else:
         handNameLabel.hide()
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:23,代码来源:PokerTableGUI.py

示例2: setTableState

# 需要导入模块: from pirates.piratesbase import PLocalizer [as 别名]
# 或者: from pirates.piratesbase.PLocalizer import getHandNameFull [as 别名]
 def setTableState(self, round, buttonSeat, communityCardValues, playerHandValues, totalWinningsArray):
     self.clearTable()
     self.playerStatusPanels[self.getGuiIndex(buttonSeat)].anteLabel.show()
     self.playerStatusPanels[self.getGuiIndex(buttonSeat)].dealerButton.show()
     for i in range(len(self.communityCards)):
         card = self.communityCards[i]
         if i < len(communityCardValues):
             newValue = communityCardValues[i]
             card.show()
             card.setValue(newValue)
             if newValue != PlayingCardGlobals.Unknown:
                 card.turnUp()
             
         newValue != PlayingCardGlobals.Unknown
         card.hide()
         card.setValue(PlayingCardGlobals.Unknown)
     
     for i in range(len(playerHandValues)):
         newHand = playerHandValues[i]
         guiIndex = self.getGuiIndex(i)
         panel = self.playerStatusPanels[guiIndex]
         hand = panel.hand
         handNameLabel = panel.handNameLabel
         allUnknown = 1
         for (card, newValue) in zip(hand, newHand):
             card.show()
             card.setValue(newValue)
             if newValue == PlayingCardGlobals.Unknown:
                 card.turnDown()
                 continue
             allUnknown = 0
             card.turnUp()
         
         if allUnknown:
             panel.cardScaler.setScale(0.40000000000000002)
         else:
             panel.cardScaler.setScale(0.5)
         if newHand and PlayingCardGlobals.Unknown not in newHand:
             if self.table.handIdArray:
                 seat = i
                 handId = self.table.handIdArray[seat]
                 if handId > PlayingCardGlobals.Nothing:
                     sortedHand = self.table.sortedCardsArray[seat]
                     handName = PLocalizer.getHandNameFull(self.table.handIdToHandCode(handId), sortedHand)
                     handNameLabel['text'] = handName
                     handNameLabel.show()
                 
             
     
     end = False
     length = len(totalWinningsArray)
     for i in range(length):
         if totalWinningsArray[i] != 0:
             end = True
             break
             continue
     
     if end and self.table.endOfHand:
         for i in range(length):
             if totalWinningsArray[i] > 0:
                 actor = self.table.actors[i]
                 if actor:
                     name = actor.getName()
                     win = totalWinningsArray[i]
                     message = PLocalizer.PokerChatWinGoldMessage % (name, win)
                     base.talkAssistant.receiveGameMessage(message)
                 
             
             if totalWinningsArray[i] == PlayingCardGlobals.PlayerCaughtCheating:
                 actor = self.table.actors[i]
                 if actor:
                     name = actor.getName()
                     message = PLocalizer.PokerChatCaughtCheatingMessage % name
                     base.talkAssistant.receiveGameMessage(message)
开发者ID:XamarinDeveloper,项目名称:Pirates-Online-Source,代码行数:76,代码来源:PokerTableGUI.py


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