MCPcopy Create free account
hub / github.com/ActiveState/code / getBigNum

Method getBigNum

recipes/Python/580811_Uno_TextBased/recipe-580811.py:592–606  ·  view source on GitHub ↗

Returns list of strings to draw card's value on the pile.

(self, reverse, reverseSeed=0)

Source from the content-addressed store, hash-verified

590 return "{},{}".format(self.color, self.value)
591
592 def getBigNum(self, reverse, reverseSeed=0):
593 '''Returns list of strings to draw card's value on the pile.'''
594 bigNums = []
595 colorCode = self.colorCode
596 colorCodeDark = self.colorCodeDark
597 value = self.value
598 if value == 'R':
599 if not reverse:
600 value += str(reverseSeed)
601 else:
602 value += str(9-reverseSeed)
603 for mid in self.bigNums[value]:
604 bigNums += ['{}| |{}'.format(colorCode,colorCodeDark)+mid+'{}| |\033[0m\t'.format(colorCode)]
605
606 return bigNums
607
608 def getColor(self):
609 '''Returns card's color.'''

Callers 3

eventReverseMethod · 0.80
eventWildCardMethod · 0.80
placeCardMethod · 0.80

Calls 2

strFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected