本文整理汇总了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()
示例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)