本文整理汇总了Python中card.Card.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Card.__init__方法的具体用法?Python Card.__init__怎么用?Python Card.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类card.Card
的用法示例。
在下文中一共展示了Card.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from card import Card [as 别名]
# 或者: from card.Card import __init__ [as 别名]
def __init__(self, name,
imageFileName = None,
struggles = None,
*args, **kwargs):
Card.__init__(self, name, imageFileName, *args, **kwargs)
if imageFileName != None:
self.image = StoryImage(imageFileName)
self.committed = {}
self.success = {}
self.rect = {}
self.game = None
self.Player1 = None
self.Player2 = None
if struggles is None:
struggles = []
struggles.append(TerrorStruggle())
struggles.append(CombatStruggle())
struggles.append(ArcaneStruggle())
struggles.append(InvestigationStruggle())
struggles.append(SkillStruggle())
for struggle in struggles:
struggle.addToStory(self)
self.struggles = struggles
示例2: __init__
# 需要导入模块: from card import Card [as 别名]
# 或者: from card.Card import __init__ [as 别名]
def __init__(self,channel_id,card_number):
Card.__init__(self,channel_id,card_number)
for port_id in range(14):
self.in_ports.append(InPort(channel_id,card_number,port_id,0))
self.out_ports.append(OutPort(channel_id,card_number,port_id,0))
self.raw_out_ports = '00'
self.raw_in_ports = '00'
示例3: __init__
# 需要导入模块: from card import Card [as 别名]
# 或者: from card.Card import __init__ [as 别名]
def __init__(self,id,serial):
Card.__init__(self,id,serial)
self.id = id
self.__in_ports = ['0']*14
self.__out_ports = ['0']*14
self.__raw_out_ports = ''
self.__raw_in_ports = ''
self.__pending_write = 0
示例4: __init__
# 需要导入模块: from card import Card [as 别名]
# 或者: from card.Card import __init__ [as 别名]
def __init__(self,channel_id,card_number):
Card.__init__(self,channel_id,card_number)
for port_id in range(14):
self.in_ports.append(InPort(channel_id,card_number,port_id,0))
self.out_ports.append(OutPort(channel_id,card_number,port_id,0))
self.simulation_mode = True
示例5: __init__
# 需要导入模块: from card import Card [as 别名]
# 或者: from card.Card import __init__ [as 别名]
def __init__(self,bus_id,card_number):
Card.__init__(self,bus_id,card_number)
for port_id in range(9):
self.in_ports.append(InPort(bus_id,card_number,port_id,0))
self.raw_in_ports = '00'*9