本文整理匯總了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')