本文整理汇总了Python中species.Species.choose_state方法的典型用法代码示例。如果您正苦于以下问题:Python Species.choose_state方法的具体用法?Python Species.choose_state怎么用?Python Species.choose_state使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类species.Species
的用法示例。
在下文中一共展示了Species.choose_state方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Character
# 需要导入模块: from species import Species [as 别名]
# 或者: from species.Species import choose_state [as 别名]
mancha = Character(1, 'Mancha', {'ausente':0, 'nao preenchida':1, 'preenchida':2})
pinta = Character(2, 'Pintas', {'ausente':0, 'presente':1})
m_super= Character(3, 'Membro Superior', {'ausente':0, 'presente':1})
m_infer = Character(4, 'Membro Inferior', {'ausente':0, 'presente':1})
qtd_membros = Character(5, 'Qtd de Membros', {'nenhum':0, 'um':1, 'dois':2, 'tres':3, 'quatro':4})
dedos = Character(6, 'Dedos', {'ausente':0, 'presente':1})
corpo= Character(7, 'Formato do Corpo', {'alongado':0, 'ovalado':1, 'redondo':2})
antena = Character(8, 'Antena', {'ausente':0, 'presente':1})
olhos = Character(9, 'Olhos', {'ausente':0, 'presente':1})
cabeca = Character(10, 'Formato da Cabeca', {'achatada':0, 'redonda':1, 'triangular':2})
divisao = Character(11, 'Divisao do Corpo', {'continuo':0, 'segmentado':1})
# CRIACAO DAS ESPECIES
s2 = Species(2)
s2.choose_state(mancha, 'preenchida')
s2.choose_state(pinta, 'presente')
s2.choose_state(m_super, 'presente')
s2.choose_state(m_infer, 'presente')
s2.choose_state(qtd_membros, 'quatro')
s2.choose_state(dedos, 'presente')
s2.choose_state(corpo, 'ovalado')
s2.choose_state(antena, 'ausente')
s2.choose_state(olhos, 'presente')
s2.choose_state(cabeca, 'redonda')
s2.choose_state(divisao, 'segmentado')
s7 = Species(7)
s7.choose_state(mancha, 'ausente')
s7.choose_state(pinta, 'presente')
s7.choose_state(m_super, 'ausente')