def monta(self): NONE = [None] * 4 sala1 = Sala(imn, iml, ims, imo, NONE) sala2 = Sala(irl, iro, irn, irs, NONE) #salas = [sala1,sala2] labirinto = teste.SETOR = Labirinto([sala1, sala2])
def __init__(self): inv.inicia() cena = Cena(CENA % CENAS) self.jero, self.placa, self.cruz, self.grego, self.vulgata = [ CENA % obj for obj in PROP ] self.pano, self.livro = [CENA % obj for obj in MPROP] self.capel = capel = [Cena(CENA % parede) for parede in CAPEL] self.sala = sala = Sala(*[CENA % parede for parede in CENAS]) self.atrio = atrio = Sala(*[CENA % parede for parede in INTER]) self.sanct = sanct = Sala(*[CENA % parede for parede in SANCT]) #cena.vai() cave = Labirinto(c=atrio, n=sanct, s=sala) # capel[0].meio = capel[1] capel[0].meio = Cena(vai=self.sao_jeronimo) capel[1].meio = capel[1].esquerda = capel[1].direita = sala.norte #capel[0].vai() #atrio.leste.vai() #sanct.leste.vai() self.e_limbo = Cena("") self.e_grego = Elemento(self.grego, x=510, y=210, w=280, vai=self.rasga) self.e_placa = Elemento(self.placa, x=510, y=210, w=280, cena=atrio.leste) self.e_jero = Elemento(self.jero, x=360, y=214, w=147, h=250, cena=sanct.leste, tit="icone", drag=True) #self.e_jero = Elemento(self.pano, x=360, y=212, w=150, h=250, cena=sanct.leste) self.e_jerom = Elemento(JEROM, x=0, y=400, w=150, h=250, cena=sanct.leste) self.e_vecruz = Elemento(MARCA, x=480, y=100, w=150, h=250, o=0.1, cena=capel[0], vai=self.sao_jeronimo) self.e_vecruz.o = 0.2 self.sao_jeronimo()
def __init__(self): self.todos = todos = Sala(n=SALA1, l=SALA2, s=SALA3, o=SALA4) self.todas = todas = Sala(o=SALA4, s=SALA5, l=SALA6, n=SALA1) d = hey(todas) todas.sul.vai = d.vai b = blabla(todos) todos.sul.vai = b.vai a = cansada(todos) todos.leste.vai = a.vai c = ajuda(todos) todos.norte.vai = c.vai self.todos.oeste.vai = self.todas.sul.vai self.todas.leste.vai = self.todos.norte.vai #self.todos.norte.vai #self.todas.oeste.vai #self.menino = Elemento(img=MENINO, style=dict(left=600, top=350, width=300, height="200px")) #self.menino.entra (todos.leste) #self.falamenino= Texto(todos.leste, "Muito obrigado, Senhora Neide") #self.menino.vai=self.falamenino.vai self.a = Elemento( img=A, tit= "Olá, eu sou Rosa. Tenho 13 anos. Preciso contar algo terrível que aconteceu. A maquiagem que eu tanto queria acabou no shopping da cidade e nunca que eu irei me submeter a ir na lojinha do interior. Minha vida é uma merda!!!", style=dict(left=50, top=300, width=400, height="200px"), vai=self.errou) self.b = Elemento( img=B, tit= "Olá, eu sou a Dani. Tenho 14 anos. Estou aqui para te contar sobre algo que infelizmente me doi muito. O preconceito e a discriminação muitas vezes resultam em situações em que pessoas são humilhadas, agredidas e acusadas injustamente simplesmente pelo fato de fazerem parte de algum grupo social específico. A afirmação é de uma pesquisa da Fundação Instituto de Pesquisa Econômicas (Fipe) que publicou em junho, em parceria com o Inep, um estudo sobre preconceito e discriminação no ambiente escolar. De acordo com a pesquisa, as práticas discriminatórias têm como principais vítimas os alunos, especialmente negros, pobres e homossexuais, com médias de 19%, 18% e 17% respectivamente para o índice percentual de conhecimento de situações de bullying nas escolas. - Observatório da Educação. 'http://www.observatoriodaeducacao.org.br/index.php/entrevistas/56-entrevistas/817-criancas-negras-estao-entre-as-principais-vitimas-de-bullying'", style=dict( left=300, top=300, width=300, height="200px", ), vai=self.acertou) self.c = Elemento( img="https://i.imgur.com/yuFIURj.png", tit= "Olá, eu sou Pablo. Tenho 15 anos e hoje aconteceu uma tragédia. Meu pai não depositou o valor todo da minha mesada. Não consegui comprar o relógio que eu tanto queria. Aff, pai tóxico", style=dict(left=600, top=300, width=200, height="200px"), vai=self.errou) self.a.entra(todos.sul) self.b.entra(todos.sul) self.c.entra(todos.sul) self.a.vai()
def vai_reticulo(self): self.sala_a = sala_a = Sala(*[IM.format(lnk) for lnk in RETICULO[0]]) sala_b_args = [IM.format(lnk) for lnk in RETICULO[1]] self.sala_b = sala_b = Sala(*sala_b_args) lab0 = Labirinto(sala_a, sala_b, sala_b, sala_b, sala_b) lab1 = Labirinto(sala_b, sala_a, sala_a, sala_a, sala_a) self.oeste() self.norte() self.leste() self.sul() self.boeste() self.bnorte() self.bleste() self.bsul() sala_a.norte.vai()
def __init__(self): self.frida = frida = Sala(n=SALA1, l=SALA2, s=SALA3, o=SALA4) #self.frida.norte.vai() Texto( frida.norte, "Olá, você está no centro de pesquisa. Encaminhe- se a direita " ).vai() Texto(frida.leste, "Vá para a sala do Dr. Zuckman").vai() self.foco = Elemento(img=FOCO) viu = Elemento(FOCO, x=830, y=200, w=30, h=200, tit="porta", cena=self.frida.leste, style={"opacity": 0}) # vai=self.frida.sul.vai) self.falaporta = Texto(frida.leste, "A porta está trancada") self.foco.vai = self.falaporta.vai self.papel = Elemento(img="https://i.imgur.com/SmuKKmZ.jpg", tit="desenho", x=830, y=200, w=30, h=200) self.papel.entra(frida.leste)
class OI(): #def _init_main (self) #ceni = Cena(img = CENI) #hospital = CE(img = HOSPITAL) lilita = Elemento(img=LILITA, style=dict(left=100, top=150, width=200, height="150px")) #boneca.entra(ceni) sala1 = Cena(img=SALA1) sala2 = Cena(img=SALA2) sala3 = Cena(img=SALA3) sala4 = Cena(img=SALA4) self.ceu = ceu = Sala(n=SALA1, s=SALA2, o=SALA3, l=SALA4) boneca = Elemento(img=BONECA, tit="Olá, eu sou o homem de ferro", style=dict(left=100, top=150, width=200, height="150px")) boneca.entra(ceu.oeste) falaboneca = Texto(SALA3, "Hellou") boneca.vai = falaboneca.vai #ceni.entra(ceu.norte) #hospital.entra(ceu.leste) bilu = Elemento(img=BILU, tit="Olá, eu sou Bilu") bilu.entra(ceu.leste) falabilu = Texto(SALA4, "Olá") bilu.vai = falabilu.vai ana = Elemento(img=ANA) ana.entra(ceu.sul) falaana = Texto(ceu.sul, "HIII") falaana.vai() ana.vai = falaana.vai ceu.oeste.vai() ceu.vai()
def __init__(self): self.escrit = Cena(SALA) self.cozinha = Cena(COZINHA, direita = self.escrit) self.botaoteste = Botao(QUARTO, 100, 200, acao_forte=self.passeia, cena=self.escrit) #self.botaoteste.Elemento.entra(self.escrit) self.colecao = Sala(n=self.escrit, l= self.cozinha, o= self.cozinha) self.colecao.norte.vai()
def sala_um(self): """Coleção de cenas 1""" self.norte_um = Cena(SALA_UM["NORTE"]) self.leste_um = Cena(SALA_UM["LESTE"]) self.oeste_um = Cena(SALA_UM["OESTE"]) self.sul_um = Cena(SALA_UM["SUL"]) self.colecao_um = Sala(n=self.norte_um, l=self.leste_um, s=self.sul_um, o=self.oeste_um) return self.colecao_um
def sala_dois(self): """Coleção de cenas 2""" self.norte_dois = Cena(SALA_DOIS["NORTE"]) self.leste_dois = Cena(SALA_DOIS["LESTE"]) self.oeste_dois = Cena(SALA_DOIS["OESTE"]) self.sul_dois = Cena(SALA_DOIS["SUL"]) self.colecao_dois = Sala(n=self.norte_dois, l=self.leste_dois, s=self.sul_dois, o=self.oeste_dois) return self.colecao_dois
def geografia(oeste=False): global GEO if GEO: return GEO def vai_trigo(): from amanda.main import trigonometria trigonometria().norte.vai() def _go_gymnasium(): try: gimnasium().norte.vai() except: from anastasia.main import gimnasium gimnasium().norte.vai() def _go_geometry(): try: geometry().oeste.vai() except: from kathryn.main import trigonometria as geometry geometry().oeste.vai() panstyle = dict(left=750, top=110, width=50, maxHeight="230px") GEO = _sala = Sala(NGEO, LGEO, SGEO, OGEO, "geo") mic = Elemento(MIC, tit="volcano", drag=False, drop="microscope", x=610, y=100, w=80, h=90, cena=_sala.sul, texto="Please help me, fix my name.") # mic.do_drag(False) pan = Elemento(PAN, tit="earth globe", drag=False, drop="sweep pan", x=750, y=110, w=50, h=230, style=panstyle, cena=_sala.leste, texto="Please help me, fix my name.") _ = mic, pan _sala.norte.meio = Cena(vai=vai_trigo) #_sala.sul.meio.vai = _go_gymnasium _sala.sul.meio = Cena(vai=_go_gymnasium) _sala.leste.meio = Cena(vai=_go_geometry) return _sala
def __init__(self): self.nome = "" [PAREDES.update({"{}_SUL".format(sala[:2]): imagem}) for sala, imagem in PAREDES.items() if "OESTE" in sala] museu = {"sala_{}".format(indice): Sala( *[PAREDES["C{}_{}".format(indice, rumo)] for rumo in RUMOS], nome="sala_{}".format(indice)) for indice in range(10)} mapa = [[museu["sala_{}".format((j+i) %10)] for i in range(4)] for j in range(0, 16, 4)] Labirinto.m(mapa) self.corrente = entrada = museu["sala_0"].norte topo = "Este é o código inicial para se construir a primeira cena. Cria-se uma referência à uma imagem na internet"+\ "e atribui-se à Cena" Cena.vai = self.vai self.cod = Codigo(cena=entrada, topo=topo, codigo=CODE_0, style=dict(width=400, height="250px", left=500, top=100)) entrada.vai() Museu.CUR = self
def __init__(self): cidade = Cena(CIDADE) outra = Cena(OUTRA) cidade.direita = outra outra.esquerda = cidade #texto.vai() #cidade.vai() sala = Sala(CIDADE, OUTRA, EOUTRA, MSOUTRA) cara = Elemento(CARA, cena=sala.norte, style=dict(width=40, height="40px", left=100, top=100)) cara.vai = self.vai_cara self.texto = Texto(sala.norte, "olá mundo") self.texto.foi = self.foi_texto self.texto_foi = Texto(sala.norte, "Tudo bem?") sala.norte.vai()
def __init__(self): #laboratorio= Cena(img=LABORATORIO) pass self.congresso = congresso = Sala( n=SALA1, l=SALA2, o=SALA3, s=SALA4) # -XXX- monta a sala para o TakeFioCruz d = Personagens() # -XXX- não usa o (congresso) a = Cenas(congresso, d) # congresso.norte.vai=a.vai c = Mendel(congresso) # congresso.oeste.vai=c.vai #congresso.norte.vai=d.vai #return b = Mutassaum(congresso) # congresso.sul.vai=b.vai e = Borboletas(congresso)
def trigonometria(): global TRIG if TRIG: return TRIG def vai_geo(): from naomi.main import geografia geografia().sul.vai() TRIG = _sala = Sala(QUADRA_n,QUADRA_l,QUADRA_o,QUADRA_s, "quadra") from naomi.main import Elemento _sala.sul.meio.vai = vai_geo ''' vdgball = Elemento(ball, tit = "microscope", drag=True, x = 610, y = 140, w = 80, h = 90, drop="glow ball", cena=_sala.oeste, texto="please, help me, fix my name") eglobe = Elemento(globe, tit = "volcano", drag=True, x = 160, y = 210, w = 80, h = 100, drop="earth globe", cena=_sala.leste, texto="please, help me, fix my name") volc = Elemento(volcano, tit = "glow ball", drop="volcano", x = 30, y = 500, w = 100, h = 120, cena=_sala.leste, texto="please, help me, fix my name") ''' return _sala
def school_house_(): global School_House if School_House: return School_House def _gone_school_house_(): try: gimnasium().leste.vai() except: from anastasia.main import gimnasium gimnasium().leste.vai() def _go_room23(): try: room23().norte.vai() except: from lisa.main import room23 room23().norte.vai() def _go_school_house_(): School_House.sul.meio = Cena(vai=_gone_school_house_) _vai = Cena() def redir(): _vai.vai = _gone_school_house_ historia = Cena(TIRINHA_DO_CLAUDEMILSON, _vai, _vai, _vai) texto = """ One day, there was a manifestation against Claudemilson, and she did not like it at all. So she made the demonstrators hear 'Funk Carioca' during 10 hours... """ _vai.vai = Texto(historia, '', texto, foi=redir).vai historia.vai() def go_school_house(): _go_school_house_() School_House = _sala = Sala(school_house_n, school_house_l, school_house_s, school_house_o, "trig") from naomi.main import Elemento _sala.sul.meio = Cena(vai=go_school_house) _sala.norte.meio = Cena(vai=_go_room23) napkin_holder_ = Elemento(napkin_holder, tit="vase", drag=True, x=310, y=450, w=70, h=60, drop="napkin holder", cena=_sala.norte, texto="Please help me, fix my name.") microwave_ = Elemento(microwave, tit="napkin holder", drag=True, x=430, y=100, w=200, h=150, drop="microwave", cena=_sala.oeste, texto="Please help me, fix my name.") spray_ = Elemento(spray, tit="dispenser", x=360, y=70, w=80, h=70, drop="spray", cena=_sala.leste, texto="Please help me, fix my name.") vase_ = Elemento(vase, tit="spray", drag=True, x=300, y=275, w=100, h=140, drop="vase", cena=_sala.norte, texto="Please help me, fix my name.") ligth_fixture_ = Elemento(ligth_fixture, tit="microwave", drag=True, x=50, y=40, w=100, h=100, drop="light fixture", cena=_sala.sul, texto="Please help me, fix my name.") dispenser_ = Elemento(dispenser, tit="light fixture", x=330, y=325, w=30, h=40, drop="dispenser", cena=_sala.leste, texto="Please help me, fix my name.") return _sala
def __init__(self): C_SUL = C1_SUL C2_SUL = C1_LESTE sala_0 = Sala(R_NORTE, R_LESTE, R_SUL, R_OESTE) sala_1 = Sala(C1_NORTE, C1_LESTE, C_SUL, C1_OESTE) sala_2 = Sala(C2_NORTE, C2_LESTE, C2_SUL, C2_OESTE) sala_3 = Sala(C3_NORTE, C3_LESTE, C3_SUL, C3_OESTE) sala_4 = Sala(C4_NORTE, C4_LESTE, C4_SUL, C4_OESTE) sala_5 = Sala(C5_NORTE, C5_LESTE, C5_SUL, C5_OESTE) sala_6 = Sala(C6_NORTE, C6_LESTE, C6_SUL, C6_OESTE) sala_7 = Sala(C7_NORTE, C7_LESTE, C7_SUL, C7_OESTE) sala_8 = Sala(C8_NORTE, C8_LESTE, C8_SUL, C8_OESTE) sala_9 = Sala(C9_NORTE, C9_LESTE, C9_SUL, C9_OESTE) sala_A = Sala(CA_NORTE, CA_LESTE, CA_SUL, CA_OESTE) sala_B = Sala(CB_NORTE, CB_LESTE, CB_SUL, CB_OESTE) sala_C = Sala(CC_NORTE, CC_LESTE, CC_SUL, CC_OESTE) sala_D = Sala(CD_NORTE, CD_LESTE, CD_SUL, CD_OESTE) sala_E = Sala(CE_NORTE, CE_LESTE, CE_SUL, CE_OESTE) # TEM DOIS SUL DA C9 QUE NA VERDADE ERA PARA SER C8 sala_0.norte.meio = sala_9.leste sala_0.leste.meio = sala_1.norte sala_1.oeste.meio = sala_2.norte sala_1.sul.meio = sala_0.oeste sala_2.norte.meio = sala_A.norte sala_A.norte.meio = sala_3.norte sala_A.sul.meio = sala_1.leste sala_3.norte.meio = sala_4.norte sala_3.sul.meio = sala_A.sul sala_4.oeste.meio = sala_5.norte sala_4.sul.meio = sala_3.sul sala_5.leste.meio = sala_6.norte sala_5.oeste.meio = sala_C.norte sala_5.sul.meio = sala_4.leste sala_6.sul.meio = sala_5.oeste sala_C.norte.meio = sala_D.norte sala_C.sul.meio = sala_5.leste sala_D.norte.meio = sala_7.norte sala_D.sul.meio = sala_C.sul sala_D.norte.meio = sala_E.norte sala_6.leste.meio = sala_B.norte sala_B.sul.meio = sala_6.oeste sala_7.leste.meio = sala_8.norte sala_7.sul.meio = sala_E.leste sala_8.leste.meio = sala_9.norte sala_8.sul.meio = sala_7.oeste sala_9.sul.meio = sala_8.sul sala_9.oeste.meio = sala_0.sul sala_9.sul.meio = sala_8.oeste sala_E.oeste.meio = sala_7.norte sala_E.sul.meio = sala_D.sul dino = Elemento(img=DINO, tit="Dino", style=dict(left=50, top=160, width=200, height=200)) dino.entra(sala_2.leste) def botainventario(): INVENTARIO.bota(dino) dinotexto = Texto(sala_2.leste, "e ai,colega, tudo tranks?", foi=botainventario) dino.vai = dinotexto.vai def recobra(_): INVENTARIO.cena._code_.elt.style = { "visibility": "visible", "opacity": 1 } INVENTARIO.inicia() interrogacao = Elemento(interrogacao_, cena=INVENTARIO, tit="Tutorial", vai=recobra, style=dict(left=100, top=100, width=100, height="100px")) interrogacao.entra(INVENTARIO) INVENTARIO.bota(interrogacao) video = Video(source="https://www.w3schools.com/html/mov_bbb.mp4", width="320", height="240", top=0, left=0) video.entra(sala_0.norte) #video=html.VIDEO(width="320", height="240",autoplay=True, style=dict(position="absolute", top=0, left=0)) #video<=html.SOURCE(src="https://www.w3schools.com/html/mov_bbb.mp4") #sala_0.norte.elt<=video #sala_0.norte.vai = sala_1.norte.vai() sala_0.norte.vai() # cod = Codigo(cena=sala_0.norte ,topo= "ola", codigo = "if True:print('oi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.norte, topo = "hello",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.leste, topo = "Bonju",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.oeste, topo = "Buenos dias",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod =Codigo(cena=sala_1.sul, topo = "como vai?",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) MENSAGENS = [ [ sala_0.norte, "Olá! Se prepare, que finalmente chegou o dia de aprender a programar em Python. Vamos embarcar nessa aventura já! Crie uma cena utilizando o código abaixo. ", """from _spy.vitollino.main import Cena link_para_uma_imagem = "https://i.imgur.com/IPa06hM.jpg" uma_cena=Cena(link_para_imagem) uma_cena.vai""" ], [ sala_0.leste, "Agora que você já conseguiu programar sua primeira cena, que tal acrescentar uma nova e poder navegar entre elas com um clique à direita da imagem?", """from _spy.vitollino.main import Cena link_para_primeira_imagem = "https://i.imgur.com/IPa06hM.jpg" link_para_segunda_imagem = "https://i.imgur.com/rHzbmtM.jpg" primeira_cena=Cena(link_para_primeira_imagem) segunda_cena=Cena(link_para_segunda_imagem) primeira_cena.direita = segunda_cena primeira_cena.vai() """ ], [ sala_0.sul, "Depois de aprender a acrescentar uma nova cena, você agora pode criar um cômodo completo! Utilize o código abaixo para criar as quatro cenas que formarão um cômodo inteiro.", """from _spy.vitollino.main import Cena link_para_primeira_imagem = "https://i.imgur.com/IPa06hM.jpg" link_para_segunda_imagem = "https://i.imgur.com/rHzbmtM.jpg" link_para_terceira_imagem = "https://i.imgur.com/NnVA765.jpg" link_para_quarta_imagem = "https://i.imgur.com/XJXjA9r.jpg" primeira_cena=Cena(link_para_primeira_imagem) segunda_cena=Cena(link_para_segunda_imagem) terceira_cena=Cena(link_para_terceira_imagem) quarta_cena=Cena(link_para_quarta_imagem) primeira_cena.direita = segunda_cena segunda_cena.esquerda = primeira_cena segunda_cena.direita = terceira_cena terceira_cena.esquerda = segunda_cena terceira_cena.direita = quarta_cena quarta_cena.esquerda = terceira_cena quarta_cena.direita = primeira_cena primeira_cena.esquerda = quarta_cena primeira_cena.vai() """ ], [ sala_0.oeste, "Achou o código para montar o cômodo grande? Saiba que há uma maneira de fazer o mesmo trabalho em poucas linhas, através da função Sala. Confira testando o código abaixo:", """from _spy.vitollino.main import Sala primeira_cena = "https://i.imgur.com/IPa06hM.jpg" segunda_cena = "https://i.imgur.com/rHzbmtM.jpg" terceira_cena = "https://i.imgur.com/NnVA765.jpg" quarta_cena = "https://i.imgur.com/XJXjA9r.jpg" sala = Sala(primeira_cena, segunda_cena, terceira_cena, quarta_cena) sala.norte.vai() """ ], [sala_1.norte, "Hello", "if True:print('ooi')"], [sala_1.leste, "bonju", "if True:print(':)')"], [sala_1.oeste, "Buenos dias", "if True:print('oi')"], [sala_1.sul, "como vai?", "if True:print('oi')"], [sala_2.norte, "Bora lá?", "if True:print('oi')"], [sala_2.leste, "vamos?", "if True:print('oi')"], [sala_2.oeste, "lest go", "if True:print('oi')"], [sala_2.sul, "vamonos", "if True:print('oi')"], [sala_3.norte, "como estas?", "if True:print('oi')"], [sala_3.leste, "e o dia?", "if True:print('oi')"], [sala_3.oeste, "ta calor?", "if True:print('oi')"], [sala_3.sul, "quanto graus está agora?", "if True:print('oi')"], [sala_4.norte, "hey", "if True:print('oi')"], [sala_4.leste, "parabéns", "if True:print('oi')"], [sala_4.oeste, "você chegou até aqui!", "if True:print('oi')"], [sala_4.sul, "tenha muito orgulho de vc", "if True:print('oi')"], [ sala_5.norte, "temos que comemorara pequenas vitórias", "if True:print('oi')" ], [sala_5.leste, "está indo muito bem", "if True:print('oi')"], [ sala_5.oeste, "tudo que fizer coloque amor", "if True:print('oi')" ], [sala_5.sul, "se ame", "if True:print('oi')"], [sala_6.norte, "se cuide", "if True:print('oi')"], [sala_6.leste, "hoje o dia esta lindo", "if True:print('oi')"], [ sala_6.oeste, "deixe a chuva lavar a alma", "if True:print('oi')" ], [sala_6.sul, "hasta la vista", "if True:print('oi')"], [sala_7.norte, " you say goodbye", "if True:print('oi')"], [sala_7.leste, "and say Hello", "if True:print('oi')"], [sala_7.oeste, "acredite em vc", "if True:print('oi')"], [sala_7.sul, "vc é capaz", "if True:print('oi')"], [sala_8.norte, "don't worry", "if True:print('oi')"], [sala_8.leste, "vc é capaz", "if True:print('oi')"], [sala_8.oeste, " be free", "if True:print('oi')"], [sala_8.sul, "está quase acabando", "if True:print('oi')"], [ sala_9.norte, "você esta vencendo seus medos", "if True:print('oi')" ], [sala_9.leste, "está se superando", "if True:print('oi')"], [sala_9.oeste, "respire", "if True:print('oi')"], [sala_9.sul, "comemore, pois vc venceu", "if True:print('oi')"], [sala_A.norte, "tudo vai bem", "if True:print('oi')"], [sala_A.leste, "não desista", "if True:print('oi')"], [sala_A.oeste, "não é tão complicado", "if True:print('oi')"], [sala_A.sul, "avai sim", "if True:print('oi')"], [sala_B.norte, "tudo vai bem", "if True:print('oi')"], [sala_B.leste, "não desista", "if True:print('oi')"], [sala_B.oeste, "não é tão complicado", "if True:print('oi')"], [sala_B.sul, "avai sim", "if True:print('oi')"], [sala_C.norte, "tudo vai bem", "if True:print('oi')"], [sala_C.leste, "não desista", "if True:print('oi')"], [sala_C.oeste, "não é tão complicado", "if True:print('oi')"], [sala_C.sul, "avai sim", "if True:print('oi')"], [sala_D.norte, "tudo vai bem", "if True:print('oi')"], [sala_D.leste, "não desista", "if True:print('oi')"], [sala_D.oeste, "não é tão complicado", "if True:print('oi')"], [sala_D.sul, "avai sim", "if True:print('oi')"], [sala_E.norte, "tudo vai bem", "if True:print('oi')"], [sala_E.leste, "não desista", "if True:print('oi')"], [sala_E.oeste, "não é tão complicado", "if True:print('oi')"], [sala_E.sul, "avai sim", "if True:print('oi')"] ] STYLE = dict(width=400, heigth="250px", left=400, top=100) [ Codigo(cena=a, topo=b, codigo=c, style=STYLE) for a, b, c in MENSAGENS ]
def __init__(self): C_SUL = C1_SUL C2_SUL = C1_LESTE sala_0 = Sala(R_NORTE, R_LESTE, R_SUL, R_OESTE) sala_1 = Sala(C1_NORTE, C1_LESTE, C_SUL, C1_OESTE) sala_2 = Sala(C2_NORTE, C2_LESTE, C2_SUL, C2_OESTE) sala_3 = Sala(C3_NORTE, C3_LESTE, C3_SUL, C3_OESTE) sala_4 = Sala(C4_NORTE, C4_LESTE, C4_SUL, C4_OESTE) sala_5 = Sala(C5_NORTE, C5_LESTE, C5_SUL, C5_OESTE) sala_6 = Sala(C6_NORTE, C6_LESTE, C6_SUL, C6_OESTE) sala_7 = Sala(C7_NORTE, C7_LESTE, C7_SUL, C7_OESTE) sala_8 = Sala(C8_NORTE, C8_LESTE, C8_SUL, C8_OESTE) sala_9 = Sala(C9_NORTE, C9_LESTE, C9_SUL, C9_OESTE) sala_A = Sala(CA_NORTE, CA_LESTE, CA_SUL, CA_OESTE) sala_B = Sala(CB_NORTE, CB_LESTE, CB_SUL, CB_OESTE) sala_C = Sala(CC_NORTE, CC_LESTE, CC_SUL, CC_OESTE) sala_D = Sala(CD_NORTE, CD_LESTE, CD_SUL, CD_OESTE) sala_E = Sala(CE_NORTE, CE_LESTE, CE_SUL, CE_OESTE) Labirinto.m([[sala_0, sala_1, sala_2, sala_3], [sala_4, sala_5, sala_6, sala_7], [sala_8, sala_9, sala_A, sala_B], [sala_C, sala_D, sala_E]]) sala_0.norte.vai()
def __init__(self): C_SUL = C1_SUL C2_SUL = C1_LESTE sala_0 = Sala(R_NORTE, R_LESTE, R_SUL, R_OESTE) sala_1 = Sala(C1_NORTE, C1_LESTE, C_SUL, C1_OESTE) sala_2 = Sala(C2_NORTE, C2_LESTE, C2_SUL, C2_OESTE) sala_3 = Sala(C3_NORTE, C3_LESTE, C3_SUL, C3_OESTE) sala_4 = Sala(C4_NORTE, C4_LESTE, C4_SUL, C4_OESTE) sala_5 = Sala(C5_NORTE, C5_LESTE, C5_SUL, C5_OESTE) sala_6 = Sala(C6_NORTE, C6_LESTE, C6_SUL, C6_OESTE) sala_7 = Sala(C7_NORTE, C7_LESTE, C7_SUL, C7_OESTE) sala_8 = Sala(C8_NORTE, C8_LESTE, C8_SUL, C8_OESTE) sala_9 = Sala(C9_NORTE, C9_LESTE, C9_SUL, C9_OESTE) sala_A = Sala(CA_NORTE, CA_LESTE, CA_SUL, CA_OESTE) sala_B = Sala(CB_NORTE, CB_LESTE, CB_SUL, CB_OESTE) sala_C = Sala(CC_NORTE, CC_LESTE, CC_SUL, CC_OESTE) sala_D = Sala(CD_NORTE, CD_LESTE, CD_SUL, CD_OESTE) sala_E = Sala(CE_NORTE, CE_LESTE, CE_SUL, CE_OESTE) Labirinto(sala_0, sala_1, sala_2, sala_3, sala_4) Labirinto(sala_4, sala_5, sala_6, sala_7, sala_8) Labirinto(sala_8, sala_9, sala_A, sala_B, sala_C) Labirinto(sala_C, sala_D, sala_E, sala_0, sala_1) sala_0.norte.vai() MENSAGENS = [ [ sala_0.norte, "primeiramente para usar a função labirinto do vitollino precisa ter definido as salas," "depois se usa a função labirinto para 5 salas, ex: labirinto(salaA, sala B, sala C, salaD, sala E)," "sempre conectando uma sala a outra, exemplo: labirinto(sala E, salaF,salaG,salaH,salaI)", """ ficando assim: Labirinto(sala A, sala B, sala C, sala D, sala E) """ ], [sala_1.norte, "Hello", "if True:print('ooi')"], [sala_1.leste, "bonju", "if True:print(':)')"], [sala_1.oeste, "Buenos dias", "if True:print('oi')"], [sala_1.sul, "como vai?", "if True:print('oi')"], [sala_2.norte, "Bora lá?", "if True:print('oi')"], ] STYLE = dict(width=500, heigth="3000px", left=500, top=100) [ Codigo(cena=a, topo=b, codigo=c, style=STYLE) for a, b, c in MENSAGENS ]
def trigonometria(): global TRIG if TRIG: return TRIG def _gone_geography(): try: geography().oeste.vai() except: from naomi.main import geografia as geography geography().oeste.vai() def _go_trigonometria(): TRIG.norte.meio = Cena(vai=_gone_geography) _vai = Cena() def redir(): _vai.vai = _gone_geography historia = Cena(TIRINHA_DO_CLAUDEMILSON, _vai, _vai, _vai) texto = """ Cleison decides to go to the computer to see videos of kittens. As he sat on the chair, he slapped his arm on the sill.Ouch, it hurts. - The sill say. - I am Sorry. Says Cleison - It is so dark in here, I will turn on the lights. When he turns it on:- Ouch!!Cried the switch. Sorry again. Why do you feel so much pain? It is because Claudemilson cast a spell on us and now we feel pain all the time.But why does she do that??? It is because when we feel pain we are pro-Claudemilson. """ _vai.vai = Texto(historia, '', texto, foi=redir).vai historia.vai() def go_trigonometria(): _go_trigonometria() def go_geography(): try: geography().norte.vai() except: from naomi.main import geografia as geography geography().oeste.vai() TRIG = _sala = Sala(CLASS1, CLASS2, CLASS3, CLASS4, "trig") from naomi.main import Elemento _sala.leste.meio = Cena(vai=go_trigonometria) #_sala.oeste.meio.vai = _go_geography parap = Elemento(parapeito, tit="socket", drag=True, x=610, y=300, w=80, h=90, drop="sill", cena=_sala.norte, texto="Please help me, fix my name.") interr = Elemento(interruptor, tit="sill", drag=True, x=360, y=160, w=40, h=70, drop="light switch", cena=_sala.leste, texto="Please help me, fix my name.") toma = Elemento(tomada, tit="screen", drag=True, x=100, y=300, w=60, h=70, drop="socket", cena=_sala.sul, texto="Please help me, fix my name.") mono = Elemento(monitor, tit="light switch", drag=True, x=105, y=335, w=90, h=80, drop="screen", cena=_sala.oeste, texto="Please help me, fix my name.") return _sala
def __init__(self): self.um = um = Sala(n=SALA1, l=SALA2, s=SALA3, o=SALA4) self.um.sul.direita = Cena() self.uma = uma = Sala(o=SALA4, s=SALA5, l=SALA6, n=SALA1) self.dois = dois = Sala(n=SALA1, s=SALA7, l=SALA8, o=SALA4) self.tres = tres = Sala(o=SALA4, s=SALA9, l=SALA10, n=SALA1) self.quatro = quatro = Sala(n=SALA1, l=SALA11, s=SALA12, o=SALA4) self.cinco = cinco = Sala(o=SALA4, l=SALA13, s=SALA14, n=SALA1) self.um.norte.vai() #def texto_norte_um(self): Texto( self.um.norte, "Seja bem vindo, cientista! Hoje iremos aprender um pouquinho sobre biologia com o auxilio da nossa maravilhosa tecnologia. Vamos nessa?" ).vai() # #O JOGADOR TERÁ QUE APERTAR O BOTAO PARA LIGAR O COMPUTADOR self.botao = Elemento(img=BOTAO, tit="ligar", style=dict(left=350, top=250, width=30, height="30px")) self.botao.entra(um.norte) self.botao.vai = self.um.leste.vai #def texto_leste_um(self): self.voltar1 = Elemento( img="https://image.flaticon.com/icons/png/512/74/74345.png", tit="desligar", style=dict(left=200, top=500, width=60, height="50px")) self.voltar1.entra(um.leste) self.voltar1.vai = self.um.norte.vai #APÓS ELE LIGAR O COMPUTADOR TERÁ QUE COLOCAR A SENHA QUE É "SINTESE DE PROTEINAS" sin = Elemento(FOCO, x=460, y=250, w=150, h=80, cena=self.um.leste, style={"opacity": 0}, vai=self.um.sul.vai) pasta = Elemento(FOCOSE, x=750, y=230, w=130, h=80, cena=self.um.sul, style={"opacity": 0}, vai=self.texto_oeste_um) self.voltar2 = Elemento( img="https://image.flaticon.com/icons/png/512/74/74345.png", tit="voltar", style=dict(left=200, top=500, width=60, height="50px")) self.voltar2.entra(um.sul) self.voltar2.vai = self.um.leste.vai
def __init__(self): C_SUL = C1_SUL C2_SUL = C1_LESTE sala_0 = Sala(R_NORTE, R_LESTE, R_SUL, R_OESTE) sala_1 = Sala(C1_NORTE, C1_LESTE, C_SUL, C1_OESTE) sala_2 = Sala(C2_NORTE, C2_LESTE, C2_SUL, C2_OESTE) sala_3 = Sala(C3_NORTE, C3_LESTE, C3_SUL, C3_OESTE) sala_4 = Sala(C4_NORTE, C4_LESTE, C4_SUL, C4_OESTE) sala_5 = Sala(C5_NORTE, C5_LESTE, C5_SUL, C5_OESTE) sala_6 = Sala(C6_NORTE, C6_LESTE, C6_SUL, C6_OESTE) sala_7 = Sala(C7_NORTE, C7_LESTE, C7_SUL, C7_OESTE) sala_8 = Sala(C8_NORTE, C8_LESTE, C8_SUL, C8_OESTE) sala_9 = Sala(C9_NORTE, C9_LESTE, C9_SUL, C9_OESTE) sala_A = Sala(CA_NORTE, CA_LESTE, CA_SUL, CA_OESTE) sala_B = Sala(CB_NORTE, CB_LESTE, CB_SUL, CB_OESTE) sala_C = Sala(CC_NORTE, CC_LESTE, CC_SUL, CC_OESTE) sala_D = Sala(CD_NORTE, CD_LESTE, CD_SUL, CD_OESTE) sala_E = Sala(CE_NORTE, CE_LESTE, CE_SUL, CE_OESTE) # TEM DOIS SUL DA C9 QUE NA VERDADE ERA PARA SER C8 sala_0.norte.meio = sala_9.leste sala_0.leste.meio = sala_1.norte sala_1.oeste.meio = sala_2.norte sala_1.sul.meio = sala_0.oeste sala_2.norte.meio = sala_A.norte sala_A.norte.meio = sala_3.norte sala_A.sul.meio = sala_1.leste sala_3.norte.meio = sala_4.norte sala_3.sul.meio = sala_A.sul sala_4.oeste.meio = sala_5.norte sala_4.sul.meio = sala_3.sul sala_5.leste.meio = sala_6.norte sala_5.oeste.meio = sala_C.norte sala_5.sul.meio = sala_4.leste sala_6.sul.meio = sala_5.oeste sala_C.norte.meio = sala_D.norte sala_C.sul.meio = sala_5.leste sala_D.norte.meio = sala_7.norte sala_D.sul.meio = sala_C.sul sala_D.norte.meio = sala_E.norte sala_6.leste.meio = sala_B.norte sala_B.sul.meio = sala_6.oeste sala_7.leste.meio = sala_8.norte sala_7.sul.meio = sala_E.leste sala_8.leste.meio = sala_9.norte sala_8.sul.meio = sala_7.oeste sala_9.sul.meio = sala_8.sul sala_9.oeste.meio = sala_0.sul sala_9.sul.meio = sala_8.oeste sala_E.oeste.meio = sala_7.norte sala_E.sul.meio = sala_D.sul dino = Elemento(img=DINO, tit="Dino", style=dict(left=50, top=160, width=200, height=200)) dino.entra(sala_2.leste) dinotexto = Texto(sala_2.leste, "e ai,colega, tudo tranks?") dino.vai = dinotexto.vai #sala_0.norte.vai = sala_1.norte.vai() sala_0.norte.vai() # cod = Codigo(cena=sala_0.norte ,topo= "ola", codigo = "if True:print('oi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.norte, topo = "hello",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.leste, topo = "Bonju",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.oeste, topo = "Buenos dias",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod =Codigo(cena=sala_1.sul, topo = "como vai?",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) MENSAGENS = [ [sala_0.norte, "tendi", "tamu junto"], [sala_1.norte, "Hello", "if True:print('ooi')"], [sala_1.leste, "bonju", "if True:print(':)')"], [sala_1.oeste, "Buenos dias", "if True:print('oi')"], [sala_1.sul, "como vai?", "if True:print('oi')"], [sala_2.norte, "Bora lá?", "if True:print('oi')"], [ sala_2.leste, "Para associar um elemento a um texto, é preciso importar o elemento e texto do vitollino.Em seguida,dizer em qual sala(ou cena) aparecerá o texto.Apos isso e so adicionar o texto que quiser e pra terminar dar o comando de vai para o texto aparecer ao clicar no elemento.Codigo: ", """ from _spy.vitollino.main import Elemento, Texto dino = Elemento(img=DINO, tit="Dino", style=dict(left=50, top=160, width=200, height=200)) dino.entra(sala_2.leste) dinotexto = Texto(sala_2.leste, "e aí,colega, tudo tranks?") dino.vai = dinotexto.vai """ ], [sala_2.oeste, "lest go", "if True:print('oi')"], [sala_2.sul, "vamonos", "if True:print('oi')"], [sala_3.norte, "como estas?", "if True:print('oi')"], [sala_3.leste, "e o dia?", "if True:print('oi')"], [sala_3.oeste, "ta calor?", "if True:print('oi')"], [sala_3.sul, "quanto graus está agora?", "if True:print('oi')"], [sala_4.norte, "hey", "if True:print('oi')"], [sala_4.leste, "parabéns", "if True:print('oi')"], [sala_4.oeste, "você chegou até aqui!", "if True:print('oi')"], [sala_4.sul, "tenha muito orgulho de vc", "if True:print('oi')"], [ sala_5.norte, "temos que comemorara pequenas vitórias", "if True:print('oi')" ], [sala_5.leste, "está indo muito bem", "if True:print('oi')"], [ sala_5.oeste, "tudo que fizer coloque amor", "if True:print('oi')" ], [sala_5.sul, "se ame", "if True:print('oi')"], [sala_6.norte, "se cuide", "if True:print('oi')"], [sala_6.leste, "hoje o dia esta lindo", "if True:print('oi')"], [ sala_6.oeste, "deixe a chuva lavar a alma", "if True:print('oi')" ], [sala_6.sul, "hasta la vista", "if True:print('oi')"], [sala_7.norte, " you say goodbye", "if True:print('oi')"], [sala_7.leste, "and say Hello", "if True:print('oi')"], [sala_7.oeste, "acredite em vc", "if True:print('oi')"], [sala_7.sul, "vc é capaz", "if True:print('oi')"], [sala_8.norte, "don't worry", "if True:print('oi')"], [sala_8.leste, "vc é capaz", "if True:print('oi')"], [sala_8.oeste, " be free", "if True:print('oi')"], [sala_8.sul, "está quase acabando", "if True:print('oi')"], [ sala_9.norte, "você esta vencendo seus medos", "if True:print('oi')" ], [sala_9.leste, "está se superando", "if True:print('oi')"], [sala_9.oeste, "respire", "if True:print('oi')"], [sala_9.sul, "comemore, pois vc venceu", "if True:print('oi')"], [sala_A.norte, "tudo vai bem", "if True:print('oi')"], [sala_A.leste, "não desista", "if True:print('oi')"], [sala_A.oeste, "não é tão complicado", "if True:print('oi')"], [sala_A.sul, "avai sim", "if True:print('oi')"], [sala_B.norte, "tudo vai bem", "if True:print('oi')"], [sala_B.leste, "não desista", "if True:print('oi')"], [sala_B.oeste, "não é tão complicado", "if True:print('oi')"], [sala_B.sul, "avai sim", "if True:print('oi')"], [sala_C.norte, "tudo vai bem", "if True:print('oi')"], [sala_C.leste, "não desista", "if True:print('oi')"], [sala_C.oeste, "não é tão complicado", "if True:print('oi')"], [sala_C.sul, "avai sim", "if True:print('oi')"], [sala_D.norte, "tudo vai bem", "if True:print('oi')"], [sala_D.leste, "não desista", "if True:print('oi')"], [sala_D.oeste, "não é tão complicado", "if True:print('oi')"], [sala_D.sul, "avai sim", "if True:print('oi')"], [sala_E.norte, "tudo vai bem", "if True:print('oi')"], [sala_E.leste, "não desista", "if True:print('oi')"], [sala_E.oeste, "não é tão complicado", "if True:print('oi')"], [sala_E.sul, "avai sim", "if True:print('oi')"] ] STYLE = dict(width=400, heigth="250px", left=500, top=100) [ Codigo(cena=a, topo=b, codigo=c, style=STYLE) for a, b, c in MENSAGENS ]
def __init__(self): C_SUL = C1_SUL C2_SUL = C1_LESTE sala_0 = Sala(R_NORTE, R_LESTE, R_SUL, R_OESTE) sala_1 = Sala(C1_NORTE, C1_LESTE, C_SUL, C1_OESTE) sala_2 = Sala(C2_NORTE, C2_LESTE, C2_SUL, C2_OESTE) sala_3 = Sala(C3_NORTE, C3_LESTE, C3_SUL, C3_OESTE) sala_4 = Sala(C4_NORTE, C4_LESTE, C4_SUL, C4_OESTE) sala_5 = Sala(C5_NORTE, C5_LESTE, C5_SUL, C5_OESTE) sala_6 = Sala(C6_NORTE, C6_LESTE, C6_SUL, C6_OESTE) sala_7 = Sala(C7_NORTE, C7_LESTE, C7_SUL, C7_OESTE) sala_8 = Sala(C8_NORTE, C8_LESTE, C8_SUL, C8_OESTE) sala_9 = Sala(C9_NORTE, C9_LESTE, C9_SUL, C9_OESTE) sala_A = Sala(CA_NORTE, CA_LESTE, CA_SUL, CA_OESTE) sala_B = Sala(CB_NORTE, CB_LESTE, CB_SUL, CB_OESTE) sala_C = Sala(CC_NORTE, CC_LESTE, CC_SUL, CC_OESTE) sala_D = Sala(CD_NORTE, CD_LESTE, CD_SUL, CD_OESTE) sala_E = Sala(CE_NORTE, CE_LESTE, CE_SUL, CE_OESTE) # TEM DOIS SUL DA C9 QUE NA VERDADE ERA PARA SER C8 sala_0.norte.meio = sala_9.leste sala_0.leste.meio = sala_1.norte sala_1.oeste.meio = sala_2.norte sala_1.sul.meio = sala_0.oeste sala_2.norte.meio = sala_A.norte sala_A.norte.meio = sala_3.norte sala_A.sul.meio = sala_1.leste sala_3.norte.meio = sala_4.norte sala_3.sul.meio = sala_A.sul sala_4.oeste.meio = sala_5.norte sala_4.sul.meio = sala_3.sul sala_5.leste.meio = sala_6.norte sala_5.oeste.meio = sala_C.norte sala_5.sul.meio = sala_4.leste sala_6.sul.meio = sala_5.oeste sala_C.norte.meio = sala_D.norte sala_C.sul.meio = sala_5.leste sala_D.norte.meio = sala_7.norte sala_D.sul.meio = sala_C.sul sala_D.norte.meio = sala_E.norte sala_6.leste.meio = sala_B.norte sala_B.sul.meio = sala_6.oeste sala_7.leste.meio = sala_8.norte sala_7.sul.meio = sala_E.leste sala_8.leste.meio = sala_9.norte sala_8.sul.meio = sala_7.oeste sala_9.sul.meio = sala_8.sul sala_9.oeste.meio = sala_0.sul sala_9.sul.meio = sala_8.oeste sala_E.oeste.meio = sala_7.norte sala_E.sul.meio = sala_D.sul #sala_0.norte.vai = sala_1.norte.vai() sala_0.norte.vai() # cod = Codigo(cena=sala_0.norte ,topo= "ola", codigo = "if True:print('oi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.norte, topo = "hello",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.leste, topo = "Bonju",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.oeste, topo = "Buenos dias",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod =Codigo(cena=sala_1.sul, topo = "como vai?",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) MENSAGENS = [ [sala_0.norte, "tendi", "tamu junto"], [sala_1.norte, "Hello", "if True:print('ooi')"], [sala_1.leste, "bonju", "if True:print(':)')"], [sala_1.oeste, "Buenos dias", "if True:print('oi')"], [sala_1.sul, "como vai?", "if True:print('oi')"], [sala_2.norte, "Bora lá?", "if True:print('oi')"], [sala_2.leste, "vamos?", "if True:print('oi')"], [sala_2.oeste, "lest go", "if True:print('oi')"], [sala_2.sul, "vamonos", "if True:print('oi')"], [sala_3.norte, "como estas?", "if True:print('oi')"], [sala_3.leste, "e o dia?", "if True:print('oi')"], [sala_3.oeste, "ta calor?", "if True:print('oi')"], [sala_3.sul, "quanto graus está agora?", "if True:print('oi')"], [sala_4.norte, "hey", "if True:print('oi')"], [sala_4.leste, "parabéns", "if True:print('oi')"], [sala_4.oeste, "você chegou até aqui!", "if True:print('oi')"], [sala_4.sul, "tenha muito orgulho de vc", "if True:print('oi')"], [ sala_5.norte, "temos que comemorara pequenas vitórias", "if True:print('oi')" ], [sala_5.leste, "está indo muito bem", "if True:print('oi')"], [ sala_5.oeste, "tudo que fizer coloque amor", "if True:print('oi')" ], [sala_5.sul, "se ame", "if True:print('oi')"], [sala_6.norte, "se cuide", "if True:print('oi')"], [sala_6.leste, "hoje o dia esta lindo", "if True:print('oi')"], [ sala_6.oeste, "deixe a chuva lavar a alma", "if True:print('oi')" ], [sala_6.sul, "hasta la vista", "if True:print('oi')"], [sala_7.norte, " you say goodbye", "if True:print('oi')"], [sala_7.leste, "and say Hello", "if True:print('oi')"], [ sala_7.oeste, "Para inserir um Elemento à cena é preciso escolher uma imagem e importar o Elemento do Vitollino. Em seguida, ajustar as dimensões da imagem e seu posicionamento. Por fim, dar o comando para o Elemento aparecer na sala desejada. Código:", """from _spy.vitollino.main import Elemento pedra = Elemento(img=PEDRA, tit="Pedra", style=dict(left=40, top=380, width=200, height="150px")) pedra.entra(sala_7.oeste) pedra.vai """ ], [sala_7.sul, "vc é capaz", "if True:print('oi')"], [sala_8.norte, "don't worry", "if True:print('oi')"], [sala_8.leste, "vc é capaz", "if True:print('oi')"], [sala_8.oeste, " be free", "if True:print('oi')"], [sala_8.sul, "está quase acabando", "if True:print('oi')"], [ sala_9.norte, "você esta vencendo seus medos", "if True:print('oi')" ], [sala_9.leste, "está se superando", "if True:print('oi')"], [sala_9.oeste, "respire", "if True:print('oi')"], [sala_9.sul, "comemore, pois vc venceu", "if True:print('oi')"], [sala_A.norte, "tudo vai bem", "if True:print('oi')"], [sala_A.leste, "não desista", "if True:print('oi')"], [sala_A.oeste, "não é tão complicado", "if True:print('oi')"], [sala_A.sul, "avai sim", "if True:print('oi')"], [sala_B.norte, "tudo vai bem", "if True:print('oi')"], [sala_B.leste, "não desista", "if True:print('oi')"], [sala_B.oeste, "não é tão complicado", "if True:print('oi')"], [sala_B.sul, "avai sim", "if True:print('oi')"], [sala_C.norte, "tudo vai bem", "if True:print('oi')"], [sala_C.leste, "não desista", "if True:print('oi')"], [sala_C.oeste, "não é tão complicado", "if True:print('oi')"], [sala_C.sul, "avai sim", "if True:print('oi')"], [sala_D.norte, "tudo vai bem", "if True:print('oi')"], [sala_D.leste, "não desista", "if True:print('oi')"], [sala_D.oeste, "não é tão complicado", "if True:print('oi')"], [sala_D.sul, "avai sim", "if True:print('oi')"], [sala_E.norte, "tudo vai bem", "if True:print('oi')"], [sala_E.leste, "não desista", "if True:print('oi')"], [sala_E.oeste, "não é tão complicado", "if True:print('oi')"], [sala_E.sul, "avai sim", "if True:print('oi')"] ] STYLE = dict(width=400, heigth="250px", left=500, top=100) [ Codigo(cena=a, topo=b, codigo=c, style=STYLE) for a, b, c in MENSAGENS ] pedra = Elemento(img=PEDRA, tit="Pedra", style=dict(left=40, top=380, width=200, height="150px")) pedra.entra(sala_7.oeste) pedra.vai
def trigonometria(): global TRIG if TRIG: return TRIG def _foi_geo(): try: geografia().sul.vai() except: from naomi.main import geografia geografia().sul.vai() def _vai_geo(): TRIG.sul.meio.vai = _foi_geo _vai = Cena(TIRINHA_DO_CLAUDEMILSON) def redir(): _vai.vai = _foi_geo historia = Cena(TIRINHA_DO_CLAUDEMILSON, _vai, _vai, _vai) texto = """Then when he stay house, he sit on the sofa,and turn on the TV and saw the following head line: - Manifestation on the street Dr. poop my pants. The manifestation is happening behind her house, and have peoples whif plates, turning down bus and screaming: - Became Robervald, became Claudemilson, became Robervald Claudemilson!!!!!!!!!!!!!!! He tired of all Claudemilson's and decide go sleep. Then he wake up at morning, and cout to her daddy and his mother of the crazy nightmare he has, and sit to turn on the TV and saw: - has a manifestation here the peoples are screaming: BECAME CLAUDEMILSON!!!!!!!!!!!!!!""" _vai.vai = Texto(historia, '', texto, foi=redir).vai historia.vai() def vai_geo(): _vai_geo() TRIG = _sala = Sala(trig_n, trig_e, trig_s, trig_o, "trig") from naomi.main import Elemento _sala.sul.meio = Cena(TIRINHA_DO_CLAUDEMILSON, vai=vai_geo) vdgball = Elemento(ball, tit="microscope", drag=True, x=610, y=140, w=80, h=90, drop="glow ball", cena=_sala.oeste, texto="Please help me, fix my name.") eglobe = Elemento(globe, tit="sweep pan", drag=True, x=160, y=210, w=80, h=100, drop="earth globe", cena=_sala.leste, texto="Please, help me, fix my name.") volc = Elemento(volcano, tit="glow ball", drop="volcano", x=30, y=500, w=100, h=120, cena=_sala.leste, texto="Please help me, fix my name.") return _sala
def __init__(self): C_SUL = C1_SUL C2_SUL = C1_LESTE sala_0 = Sala(R_NORTE, R_LESTE, R_SUL, R_OESTE) sala_1 = Sala(C1_NORTE, C1_LESTE, C_SUL, C1_OESTE) sala_2 = Sala(C2_NORTE, C2_LESTE, C2_SUL, C2_OESTE) sala_3 = Sala(C3_NORTE, C3_LESTE, C3_SUL, C3_OESTE) sala_4 = Sala(C4_NORTE, C4_LESTE, C4_SUL, C4_OESTE) sala_5 = Sala(C5_NORTE, C5_LESTE, C5_SUL, C5_OESTE) sala_6 = Sala(C6_NORTE, C6_LESTE, C6_SUL, C6_OESTE) sala_7 = Sala(C7_NORTE, C7_LESTE, C7_SUL, C7_OESTE) sala_8 = Sala(C8_NORTE, C8_LESTE, C8_SUL, C8_OESTE) sala_9 = Sala(C9_NORTE, C9_LESTE, C9_SUL, C9_OESTE) sala_A = Sala(CA_NORTE, CA_LESTE, CA_SUL, CA_OESTE) sala_B = Sala(CB_NORTE, CB_LESTE, CB_SUL, CB_OESTE) sala_C = Sala(CC_NORTE, CC_LESTE, CC_SUL, CC_OESTE) sala_D = Sala(CD_NORTE, CD_LESTE, CD_SUL, CD_OESTE) sala_E = Sala(CE_NORTE, CE_LESTE, CE_SUL, CE_OESTE) # TEM DOIS SUL DA C9 QUE NA VERDADE ERA PARA SER C8 sala_0.norte.meio = sala_9.leste sala_0.leste.meio = sala_1.norte sala_1.oeste.meio = sala_2.norte sala_1.sul.meio = sala_0.oeste sala_2.norte.meio = sala_A.norte sala_A.norte.meio = sala_3.norte sala_A.sul.meio = sala_1.leste sala_3.norte.meio = sala_4.norte sala_3.sul.meio = sala_A.sul sala_4.oeste.meio = sala_5.norte sala_4.sul.meio = sala_3.sul sala_5.leste.meio = sala_6.norte sala_5.oeste.meio = sala_C.norte sala_5.sul.meio = sala_4.leste sala_6.sul.meio = sala_5.oeste sala_C.norte.meio = sala_D.norte sala_C.sul.meio = sala_5.leste sala_D.norte.meio = sala_7.norte sala_D.sul.meio = sala_C.sul sala_D.norte.meio = sala_E.norte sala_6.leste.meio = sala_B.norte sala_B.sul.meio = sala_6.oeste sala_7.leste.meio = sala_8.norte sala_7.sul.meio = sala_E.leste sala_8.leste.meio = sala_9.norte sala_8.sul.meio = sala_7.oeste sala_9.sul.meio = sala_8.sul sala_9.oeste.meio = sala_0.sul sala_9.sul.meio = sala_8.oeste sala_E.oeste.meio = sala_7.norte sala_E.sul.meio = sala_D.sul #sala_0.norte.vai = sala_1.norte.vai() sala_0.norte.vai() # cod = Codigo(cena=sala_0.norte ,topo= "ola", codigo = "if True:print('oi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.norte, topo = "hello",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.leste, topo = "Bonju",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.oeste, topo = "Buenos dias",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod =Codigo(cena=sala_1.sul, topo = "como vai?",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) MENSAGENS = [ [sala_0.norte, "tendi", "tamu junto"], [sala_1.norte, "Hello", "if True:print('ooi')"], [sala_1.leste, "bonju", "if True:print(':)')"], [sala_1.oeste, "Buenos dias", "if True:print('oi')"], [sala_1.sul, "como vai?", "if True:print('oi')"], [sala_2.norte, "Bora lá?", "if True:print('oi')"], [sala_2.leste, "vamos?", "if True:print('oi')"], [sala_2.oeste, "lest go", "if True:print('oi')"], [sala_2.sul, "vamonos", "if True:print('oi')"], [sala_3.norte, "como estas?", "if True:print('oi')"], [sala_3.leste, "e o dia?", "if True:print('oi')"], [sala_3.oeste, "ta calor?", "if True:print('oi')"], [sala_3.sul, "quanto graus está agora?", "if True:print('oi')"], [sala_4.norte, "hey", "if True:print('oi')"], [sala_4.leste, "parabéns", "if True:print('oi')"], [sala_4.oeste, "você chegou até aqui!", "if True:print('oi')"], [sala_4.sul, "tenha muito orgulho de vc", "if True:print('oi')"], [ sala_5.norte, "temos que comemorara pequenas vitórias", "if True:print('oi')" ], [sala_5.leste, "está indo muito bem", "if True:print('oi')"], [ sala_5.oeste, "tudo que fizer coloque amor", "if True:print('oi')" ], [sala_5.sul, "se ame", "if True:print('oi')"], [sala_6.norte, "se cuide", "if True:print('oi')"], [sala_6.leste, "hoje o dia esta lindo", "if True:print('oi')"], [ sala_6.oeste, "deixe a chuva lavar a alma", "if True:print('oi')" ], [sala_6.sul, "hasta la vista", "if True:print('oi')"], [sala_7.norte, " you say goodbye", "if True:print('oi')"], [sala_7.leste, "and say Hello", "if True:print('oi')"], [sala_7.oeste, "acredite em vc", "if True:print('oi')"], [sala_7.sul, "vc é capaz", "if True:print('oi')"], [sala_8.norte, "don't worry", "if True:print('oi')"], [sala_8.leste, "vc é capaz", "if True:print('oi')"], [sala_8.oeste, " be free", "if True:print('oi')"], [sala_8.sul, "está quase acabando", "if True:print('oi')"], [ sala_9.norte, "você esta vencendo seus medos", "if True:print('oi')" ], [sala_9.leste, "está se superando", "if True:print('oi')"], [sala_9.oeste, "respire", "if True:print('oi')"], [sala_9.sul, "comemore, pois vc venceu", "if True:print('oi')"], [sala_A.norte, "tudo vai bem", "if True:print('oi')"], [sala_A.leste, "não desista", "if True:print('oi')"], [sala_A.oeste, "não é tão complicado", "if True:print('oi')"], [sala_A.sul, "avai sim", "if True:print('oi')"], [sala_B.norte, "tudo vai bem", "if True:print('oi')"], [sala_B.leste, "não desista", "if True:print('oi')"], [sala_B.oeste, "não é tão complicado", "if True:print('oi')"], [sala_B.sul, "avai sim", "if True:print('oi')"], [sala_C.norte, "tudo vai bem", "if True:print('oi')"], [sala_C.leste, "não desista", "if True:print('oi')"], [sala_C.oeste, "não é tão complicado", "if True:print('oi')"], [sala_C.sul, "avai sim", "if True:print('oi')"], [sala_D.norte, "tudo vai bem", "if True:print('oi')"], [sala_D.leste, "não desista", "if True:print('oi')"], [sala_D.oeste, "não é tão complicado", "if True:print('oi')"], [sala_D.sul, "avai sim", "if True:print('oi')"], [sala_E.norte, "tudo vai bem", "if True:print('oi')"], [sala_E.leste, "não desista", "if True:print('oi')"], [sala_E.oeste, "não é tão complicado", "if True:print('oi')"], [sala_E.sul, "avai sim", "if True:print('oi')"] ] STYLE = dict(width=400, heigth="250px", left=500, top=100) [ Codigo(cena=a, topo=b, codigo=c, style=STYLE) for a, b, c in MENSAGENS ]
def main(): inv.inicia() sala = Sala(*[CENA % parede for parede in CENAS]) sala.norte.vai() inv.cena = sala.norte Altares(sala, sala, sala)
def principalsroom(): global principalsroom_ if principalsroom_: return principalsroom_ def _gone_principalsroom(): try: principalsroom().sul.vai() except: from libby.main import gymnasium gymnasium().sul.vai() def _go_principalsroom(): principalsroom_.sul.meio.vai = _gone_principalsroom _vai = Cena(TIRINHA_PRINCIPALS_ROOM) def redir(): _vai.vai = _gone_principalsroom historia = Cena(TIRINHA_PRINCIPALS_ROOM, _vai, _vai, _vai) texto = """Cleison goes to the principal's room-- Cleison hears someone calling him. He did not know who it was. He lookes and sees a woman wearing a t-shirt with the words : 'Become Claudemilson'. She says: -Go to the Principal's room!!!! In that moment he remembered that whe he was a student there the name of the principal was George. He was cool. He did not understand anything, only followed the woman. In the principal's room, she said -You will have to listen to a rap and a funk of the dictatorship of Claudemilson and eat raw noodles!!! Out of nowhere, a sound started to beat: Become Claudemilson. While Claudemilson was distracted, Claison escaped. When he ran away, he got into his car and speeded desperately, but a traffic policeman stopped him. Meanwhile, Claudemilson had time to reach him. She began to shout with Cleison. Back at school an inspector that passed nearby decided to enter the school .He saw that Claudemilson tortured the children, and she was arrested. """ _vai.vai = Texto(historia, '', texto, foi=redir).vai historia.vai() def go_principalsroom(): _go_principalsroom() def __go_principalsroom(): from naomi.main import secretaria secretaria().secretaria.vai() principalsroom_ = _sala = Sala(Principals_room_n,Principals_room_o,Principals_room_l,Principals_room_s, "principal") from naomi.main import Elemento _sala.sul.meio.vai = go_principalsroom caixa = Elemento(caixa_mae, tit = "pipe", drag=True, x = 480, y = 140, w = 180, h = 290, drop="router rack", cena=_sala.norte, texto="Please help me, fix my name.") clip = Elemento(clips_, tit = "power plug", drag=True, x = 260, y = 410, w = 80, h = 100, drop="clips", cena=_sala.leste, texto="Please help me, fix my name.") pipes = Elemento(pipe_, tit = "router rack", drop="pipe", x = 500, y = 5, w = 100, h = 120, cena=_sala.norte, texto="Please help me, fix my name.") power = Elemento(power_plug, tit = "locker", drag=True, x = 510, y = 360, w = 100, h = 90, drop="power plug", cena=_sala.leste, texto="Please help me, fix my name.") doorl = Elemento(door_lock, tit = "keyboard", drag=True, x = 440, y = 380, w = 80, h = 100, drop="locker", cena=_sala.sul, texto="Please help me, fix my name.") keyboard_ = Elemento(keyboard, tit = "clips", drag=True, x = 300, y = 300, w = 100, h = 70, drop="keyboard", cena=_sala.leste, texto="Please help me, fix my name.") return _sala
def __init__(self): C_SUL = C1_SUL C2_SUL = C1_LESTE C6_SUL = C6_OESTE sala_0 = Sala(R_NORTE, R_LESTE, R_OESTE) sala_1 = Sala(C1_NORTE, C1_LESTE, C_SUL, C1_OESTE) sala_2 = Sala(C2_NORTE, C2_LESTE, C2_SUL, C2_OESTE) sala_3 = Sala(C3_NORTE, C3_LESTE, C3_SUL, C3_OESTE) sala_4 = Sala(C4_NORTE, C4_LESTE, C4_SUL, C4_OESTE) sala_5 = Sala(C5_NORTE, C5_LESTE, C5_SUL, C5_OESTE) sala_6 = Sala(C6_NORTE, C6_LESTE, C6_SUL, C6_OESTE) sala_7 = Sala(C7_NORTE, C7_LESTE, C7_SUL, C7_OESTE) sala_9 = Sala(C9_NORTE, C9_LESTE, C9_OESTE, C9_SUL) sala_A = Sala(CA_NORTE, CA_LESTE, CA_SUL, CA_OESTE) sala_B = Sala(CB_NORTE, CB_LESTE, CB_SUL, CB_OESTE) sala_C = Sala(CC_NORTE, CC_LESTE, CC_OESTE) sala_D = Sala(CD_NORTE, CD_LESTE, CD_SUL, CD_OESTE) # TEM DOIS SUL DA C9 QUE NA VERDADE ERA PARA SER C8 sala_0.norte.meio = sala_9.norte sala_0.leste.meio = sala_1.norte sala_1.oeste.meio = sala_2.norte sala_2.norte.meio = sala_A.norte sala_A.norte.meio = sala_3.norte sala_A.sul.meio = sala_1.leste sala_3.norte.meio = sala_4.norte sala_3.sul.meio = sala_A.sul sala_4.oeste.meio = sala_5.norte sala_4.sul.meio = sala_3.sul sala_5.leste.meio = sala_6.norte sala_5.oeste.meio = sala_C.norte sala_5.sul.meio = sala_4.leste sala_C.norte.meio = sala_D.norte sala_D.norte.meio = sala_7.norte sala_6.leste.meio = sala_B.norte sala_B.sul.meio = sala_6.oeste sala_7.norte.meio = sala_9.norte sala_9.leste.meio = sala_7.sul sala_7.leste.meio = sala_D.sul ex1 = Codigo(topo="oi", style=dict(left=100, top=100, width=100, heigth="100px")) ex.entra(sala_0) #sala_0.norte.vai = sala_1.norte.vai() sala_0.norte.vai()
def __init__(self): C_SUL = C1_SUL C2_SUL = C1_LESTE sala_0 = Sala(R_NORTE, R_LESTE, R_SUL, R_OESTE) sala_1 = Sala(C1_NORTE, C1_LESTE, C_SUL, C1_OESTE) sala_2 = Sala(C2_NORTE, C2_LESTE, C2_SUL, C2_OESTE) sala_3 = Sala(C3_NORTE, C3_LESTE, C3_SUL, C3_OESTE) sala_4 = Sala(C4_NORTE, C4_LESTE, C4_SUL, C4_OESTE) sala_5 = Sala(C5_NORTE, C5_LESTE, C5_SUL, C5_OESTE) sala_6 = Sala(C6_NORTE, C6_LESTE, C6_SUL, C6_OESTE) sala_7 = Sala(C7_NORTE, C7_LESTE, C7_SUL, C7_OESTE) sala_8 = Sala(C8_NORTE, C8_LESTE, C8_SUL, C8_OESTE) sala_9 = Sala(C9_NORTE, C9_LESTE, C9_SUL, C9_OESTE) sala_A = Sala(CA_NORTE, CA_LESTE, CA_SUL, CA_OESTE) sala_B = Sala(CB_NORTE, CB_LESTE, CB_SUL, CB_OESTE) sala_C = Sala(CC_NORTE, CC_LESTE, CC_SUL, CC_OESTE) sala_D = Sala(CD_NORTE, CD_LESTE, CD_SUL, CD_OESTE) sala_E = Sala(CE_NORTE, CE_LESTE, CE_SUL, CE_OESTE) # TEM DOIS SUL DA C9 QUE NA VERDADE ERA PARA SER C8 sala_0.norte.meio = sala_9.leste sala_0.leste.meio = sala_1.norte sala_1.oeste.meio = sala_2.norte sala_1.sul.meio = sala_0.oeste sala_2.norte.meio = sala_A.norte sala_A.norte.meio = sala_3.norte sala_A.sul.meio = sala_1.leste sala_3.norte.meio = sala_4.norte sala_3.sul.meio = sala_A.sul sala_4.oeste.meio = sala_5.norte sala_4.sul.meio = sala_3.sul sala_5.leste.meio = sala_6.norte sala_5.oeste.meio = sala_C.norte sala_5.sul.meio = sala_4.leste sala_6.sul.meio = sala_5.oeste sala_C.norte.meio = sala_D.norte sala_C.sul.meio = sala_5.leste sala_D.norte.meio = sala_7.norte sala_D.sul.meio = sala_C.sul sala_D.norte.meio = sala_E.norte sala_6.leste.meio = sala_B.norte sala_B.sul.meio = sala_6.oeste sala_7.leste.meio = sala_8.norte sala_7.sul.meio = sala_E.leste sala_8.leste.meio = sala_9.norte sala_8.sul.meio = sala_7.oeste sala_9.sul.meio = sala_8.sul sala_9.oeste.meio = sala_0.sul sala_9.sul.meio = sala_8.oeste sala_E.oeste.meio = sala_7.norte sala_E.sul.meio = sala_D.sul dino = Elemento(img=DINO, tit="Dino", style=dict(left=50, top=160, width=200, height=200)) dino.entra(sala_5.norte) def botainventario(): INVENTARIO.bota(dino) dinotexto = Texto(sala_5.norte, "e ai,colega, tudo tranks?", foi=botainventario) dino.vai = dinotexto.vai def recobra(_): #return INVENTARIO.cena._code_.elt.style = { "visibility": "visible", "opacity": 1 } INVENTARIO.inicia() interrogacao = Elemento(interrogacao_, cena=INVENTARIO, tit="Tutorial", vai=recobra, style=dict(left=100, top=100, width=100, height="100px")) interrogacao.entra(INVENTARIO) INVENTARIO.bota(interrogacao) video = Video(source="https://www.w3schools.com/html/mov_bbb.mp4", width="320", height="240", top=0, left=0) video.entra(sala_0.norte) #video=html.VIDEO(width="320", height="240",autoplay=True, style=dict(position="absolute", top=0, left=0)) #video<=html.SOURCE(src="https://www.w3schools.com/html/mov_bbb.mp4") #sala_0.norte.elt<=video #sala_0.norte.vai = sala_1.norte.vai() sala_0.norte.vai() # cod = Codigo(cena=sala_0.norte ,topo= "ola", codigo = "if True:print('oi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.norte, topo = "hello",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.leste, topo = "Bonju",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod = Codigo(cena=sala_1.oeste, topo = "Buenos dias",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) # cod =Codigo(cena=sala_1.sul, topo = "como vai?",codigo = "if True:print('ooi')",style = dict(width=400,heigth="250px",left=500,top=100)) MENSAGENS = [ [ sala_0.norte, "Olá! Se prepare, que finalmente chegou o dia de aprender a programar em Python. Vamos embarcar nessa aventura já! Crie uma cena utilizando o código abaixo. ", """from _spy.vitollino.main import Cena link_para_imagem_1 = "https://i.imgur.com/IPa06hM.jpg" cena_1=Cena(link_para_imagem_1) cena_1.vai()""" ], [ sala_0.leste, "Agora que você já conseguiu programar sua primeira cena, que tal acrescentar uma nova e poder navegar entre elas com um clique à direita da imagem?", """from _spy.vitollino.main import Cena link_para_imagem_1 = "https://i.imgur.com/IPa06hM.jpg" link_para_imagem_2 = "https://i.imgur.com/rHzbmtM.jpg" cena_1=Cena(link_para_imagem_1) cena_2=Cena(link_para_imagem_2) cena_1.direita = cena_2 cena_1.vai() """ ], [ sala_0.sul, "Depois de aprender a acrescentar uma nova cena, você agora pode criar um cômodo completo! Utilize o código abaixo para criar as quatro cenas que formarão um cômodo inteiro.", """from _spy.vitollino.main import Cena link_para_imagem_1 = "https://i.imgur.com/IPa06hM.jpg" link_para_imagem_2 = "https://i.imgur.com/rHzbmtM.jpg" link_para_imagem_3 = "https://i.imgur.com/NnVA765.jpg" link_para_imagem_4 = "https://i.imgur.com/XJXjA9r.jpg" cena_1=Cena(link_para_imagem_1) cena_2=Cena(link_para_imagem_2) cena_3=Cena(link_para_imagem_3) cena_4=Cena(link_para_imagem_4) cena_1.direita = cena_2 cena_2.esquerda = cena_1 cena_2.direita = cena_3 cena_3.esquerda = cena_2 cena_3.direita = cena_4 cena_4.esquerda = cena_3 cena_4.direita = cena_1 cena_1.esquerda = cena_4 cena_1.vai() """ ], [ sala_0.oeste, "Achou o código para montar o cômodo grande? Saiba que há uma maneira de fazer o mesmo trabalho em poucas linhas, através da função Sala. Confira testando o código abaixo:", """from _spy.vitollino.main import Sala cena_1 = "https://i.imgur.com/IPa06hM.jpg" cena_2 = "https://i.imgur.com/rHzbmtM.jpg" cena_3 = "https://i.imgur.com/NnVA765.jpg" cena_4 = "https://i.imgur.com/XJXjA9r.jpg" sala = Sala(cena_1, cena_2, cena_3, cena_4) sala.norte.vai() """ ], [sala_1.norte, "bonju", "if True:print(':)')"], [sala_1.leste, "bonju", "if True:print(':)')"], [sala_1.oeste, "Buenos dias", "if True:print('oi')"], [sala_1.sul, "como vai?", "if True:print('oi')"], [sala_2.norte, "Bora lá?", "if True:print('oi')"], [sala_2.leste, "vamos?", "if True:print('oi')"], [sala_2.oeste, "lest go", "if True:print('oi')"], [sala_2.sul, "vamonos", "if True:print('oi')"], [sala_3.norte, "como estas?", "if True:print('oi')"], [sala_3.leste, "e o dia?", "if True:print('oi')"], [sala_3.oeste, "ta calor?", "if True:print('oi')"], [sala_3.sul, "quanto graus está agora?", "if True:print('oi')"], [sala_4.norte, "hey", "if True:print('oi')"], [sala_4.leste, "parabéns", "if True:print('oi')"], [sala_4.oeste, "você chegou até aqui!", "if True:print('oi')"], [sala_4.sul, "tenha muito orgulho de vc", "if True:print('oi')"], [ sala_5.norte, """Vamos aprender a criar um Elemento! O primeiro passo é inserir ele na primeira linha do código.""", """from _spy.vitollino.main import Sala, Labirinto, Elemento""" ], [ sala_5.leste, """Insira a imagem do elemento abaixo de onde você nomeou e colocou os links das cenas""", """S1_SUL = "https://i.imgur.com/pIRvnJS.jpg" DINO = "http://imagem.ongame.com.br/pb/blog/stingrr.png" """ ], [ sala_5.oeste, "Agora, só falta pedir para ele rodar.", """dino.entra(sala_7.norte)""" ], [ sala_5.sul, "Logo abaixo da última linha do Labirinto no código", """dino = Elemento(img=DINO, tit="Dino", style=dict(left=50, top=160, width=200, height=200)) """ ], [sala_6.norte, "se cuide", "if True:print('oi')"], [sala_6.leste, "hoje o dia esta lindo", "if True:print('oi')"], [ sala_6.oeste, "deixe a chuva lavar a alma", "if True:print('oi')" ], [sala_6.sul, "hasta la vista", "if True:print('oi')"], [sala_7.norte, " you say goodbye", "if True:print('oi')"], [sala_7.leste, "and say Hello", "if True:print('oi')"], [ sala_7.oeste, "Para inserir um Elemento à cena é preciso escolher uma imagem e importar o Elemento do Vitollino. Em seguida, ajustar as dimensões da imagem e seu posicionamento. Por fim, dar o comando para o Elemento aparecer na sala desejada. Código:", """from _spy.vitollino.main import Elemento pedra = Elemento(img=PEDRA, tit="Pedra", style=dict(left=40, top=380, width=200, height="150px")) pedra.entra(sala_7.oeste) pedra.vai """ ], [sala_7.sul, "vc é capaz", "if True:print('oi')"], [sala_8.norte, "don't worry", "if True:print('oi')"], [sala_8.leste, "vc é capaz", "if True:print('oi')"], [ sala_8.oeste, "É importante saber que para seu jogo funcionar você precisa chamar a função que fez no inicio , é como se vc dissesse para o código que agora ele pode rodar.", """if __name__ == '__main__': Museu() """ ], [sala_8.sul, "está quase acabando", "if True:print('oi')"], [ sala_9.sul, "Antes de criar as próximas salas você precisa iniciar uma função inserir as salas. É como se fosse uma casa com vários cômodos, pois sem casa não é possível ter cômodos...O mesmo ocorre com o código abaixo, ele mostra onde as salas têm que estar inseridas.", """class Museu: def __init__(self): """ ], [ sala_9.oeste, "Agora você precisa definir as 4 cenas de cada sala. Essas salas servem para você criar cômodo onde se olha todas as paredes, assim , como foi feito no Tutorial Cena do jogo.Você pode criar quantas salas forem necessárias para o seu jogo.", """ sala_0 = Sala(S0_NORTE, S0_LESTE, S0_SUL, S0_OESTE) sala_1 = Sala(S1_NORTE, S1_LESTE, S1_SUL, S1_OESTE) sala_2 = Sala(S2_NORTE, S2_LESTE, S2_SUL, S2_OESTE) sala_3 = Sala(S3_NORTE, S3_LESTE, S3_SUL , S3_OESTE) sala_4 = Sala(S4_NORTE, S4_LESTE, S4_SUL, S4_OESTE) sala_5 = Sala(S5_NORTE, S5_LESTE, S5_SUL, S5_OESTE) sala_6 = Sala(S6_NORTE, S6_LESTE, S6_SUL, S6_OESTE) sala_7 = Sala(S7_NORTE, S7_LESTE, S7_SUL , S7_OESTE) sala_7A = Sala(S7A_NORTE, S7A_LESTE, S7A_SUL, S7A_OESTE) sala_7B = Sala(S7B_NORTE, S7B_LESTE, S7B_SUL,S7B_OESTE) sala_8 = Sala(S8_NORTE, S8_LESTE, S8_SUL, S8_OESTE) sala_9 = Sala(S9_NORTE, S9_LESTE, S9_SUL, S9_OESTE) sala_10 = Sala(S10_NORTE, S10_LESTE, S10_SUL, S10_OESTE) sala_S11 = Sala(S11_NORTE, S11_LESTE, S11_SUL, S11_OESTE) sala_S12 = Sala(S12_NORTE, S12_LESTE, S12_SUL, S12_OESTE) sala_0.leste.vai() if __name__ == '__main__': Museu() """ ], [ sala_9.leste, """"O primeiro passo agora é listar todas as cenas do museu nomeando e indicando os seus links.""", """S0_NORTE = "https://i.imgur.com/XJXjA9r.jpg" S0_SUL = "https://i.imgur.com/rHzbmtM.jpg" S0_LESTE = "https://i.imgur.com/IPa06hM.jpg" S0_OESTE = "https://i.imgur.com/NnVA765.jpg" S12_SUL = "https://i.imgur.com/YYuRyQR.jpg" S12_NORTE = "https://i.imgur.com/hF4Cmjp.jpg" S12_LESTE = "https://i.imgur.com/NQc4pT8.jpg" S12_OESTE = "https://i.imgur.com/1fMjUFO.jpg" S11_LESTE = "https://i.imgur.com/FlwvTzi.jpg" S11_SUL = "https://i.imgur.com/9uub4QD.jpg" S11_OESTE = "https://i.imgur.com/QpC4DBa.jpg" S11_NORTE = "https://i.imgur.com/vJZ7pKJ.jpg" S10_LESTE = "https://i.imgur.com/hxZUIOf.jpg" S10_SUL = "https://i.imgur.com/MCEVdWU.jpg" S10_OESTE = "https://i.imgur.com/3gBbfTF.jpg" S10_NORTE = "https://i.imgur.com/ozE3Qhg.jpg" S9_LESTE = "https://i.imgur.com/rRzsYT8.jpg" S9_SUL = "https://i.imgur.com/uy7BGaZ.jpg" S9_NORTE = "https://i.imgur.com/ZxC1zBd.jpg" S9_OESTE = "https://i.imgur.com/gIvRKAJ.jpg" S8_LESTE = "https://i.imgur.com/ZX7ksna.jpg" S8_SUL = "https://i.imgur.com/31TCLek.jpg" S8_NORTE = "https://i.imgur.com/xw3dplb.jpg" S8_OESTE = "https://i.imgur.com/xnD8ZtB.jpg" S7_NORTE = "https://i.imgur.com/BoFO4Dw.jpg" S7_OESTE = "https://i.imgur.com/13RbfOr.jpg" S7_LESTE = "https://i.imgur.com/VSU2JRi.jpg" S7_SUL = "https://i.imgur.com/jTAz1ND.jpg" S7A_LESTE = "https://i.imgur.com/fQjnFkR.jpg" S7A_SUL = "https://i.imgur.com/Y68GKPX.jpg" S7A_NORTE = "https://i.imgur.com/GonsqOz.jpg" S7A_OESTE = "https://i.imgur.com/MBVBvDM.jpg" S7B_SUL = "https://i.imgur.com/8lDTJl7.jpg" S7B_LESTE = "https://i.imgur.com/MGsIsD7.jpg" S7B_NORTE = "https://i.imgur.com/Q0PR8Hy.jpg" S7B_OESTE = "https://i.imgur.com/iSGp4fP.jpg" S6_OESTE = "https://i.imgur.com/AWmKBuA.jpg" S6_NORTE = "https://i.imgur.com/1Yd1evR.jpg" S6_SUL = "https://i.imgur.com/Pjtw047.jpg" S6_LESTE = "https://i.imgur.com/M61ZyN8.jpg" S5_NORTE = "https://i.imgur.com/UEMJ0Sh.jpg" S5_OESTE = "https://i.imgur.com/dyADxoS.jpg" S5_SUL = "https://i.imgur.com/VThND2I.jpg" S5_LESTE = "https://i.imgur.com/LakLTda.jpg" S4_OESTE = "https://i.imgur.com/JDxWPIs.jpg" S4_NORTE = "https://i.imgur.com/RD79yQk.jpg" S4_SUL = "https://i.imgur.com/Hw5EbJS.jpg" S4_LESTE = "https://i.imgur.com/uhY89Y6.jpg" S3_SUL = "https://i.imgur.com/vD68tan.jpg" S3_OESTE = "https://i.imgur.com/ahgVNcp.jpg" S3_LESTE = "https://i.imgur.com/NkHNi13.jpg" S3_NORTE = "https://i.imgur.com/AXT4Zcl.jpg" S2_OESTE = "https://i.imgur.com/4SOFpTG.jpg" S2_LESTE = "https://i.imgur.com/7q7iaN1.jpg" S2_NORTE = "https://i.imgur.com/HWQCqxK.jpg" S2_SUL = "https://i.imgur.com/R3FtDb2.jpg" S1_NORTE = "https://i.imgur.com/0DAX1Yq.jpg" S1_LESTE = "https://i.imgur.com/Clwe0iK.jpg" S1_OESTE = "https://i.imgur.com/cOVZAln.jpg" S1_SUL = "https://i.imgur.com/pIRvnJS.jpg" """ ], [ sala_9.sul, """Você deve ter observado que só a primeira sala ficou visível no jogo. Agora você tem que usar a função labiritno do vitollino para que seja possível juntá-las criando uma ponte , possibilitando a navegação entre elas. Assim, pode-se criar um caminho, depois de usar a função labirinto para 5 salas. Para isso, insira a função Labirinto no topo do seu código. """, """ from _spy.vitollino.main import Sala, Labirinto """ ], [ sala_9.norte, """É importante saber que a função labirinto é uma função que liga salas em forma de cruz na qual a pirmeira sala é o centro desta cruz e a segunda sala é o topo. As seguintes salas seguem o sentido horário. O termo "None" é utilizado para uma parte da cruz que não tem sala. """, """ Labirinto(sala_0, None, sala_1, sala_12, None) Labirinto(sala_2, sala_1, sala_3, None, None) Labirinto(sala_4, None, sala_5, sala_3, None) Labirinto(sala_6, None, sala_7, None, sala_5) Labirinto(sala_7A, None, None, sala_7B, sala_7) Labirinto(sala_8, sala_7, None, None, sala_9) Labirinto(sala_10, None, sala_9, None, sala_11) Labirinto(sala_11, None, sala_10, None, sala_12) """ ], [sala_A.norte, "não desista", "if True:print('oi')"], [sala_A.leste, "não desista", "if True:print('oi')"], [sala_A.oeste, "não é tão complicado", "if True:print('oi')"], [sala_A.sul, "avai sim", "if True:print('oi')"], [sala_B.norte, "tudo vai bem", "if True:print('oi')"], [sala_B.leste, "não desista", "if True:print('oi')"], [sala_B.oeste, "não é tão complicado", "if True:print('oi')"], [sala_B.sul, "avai sim", "if True:print('oi')"], [sala_C.norte, "tudo vai bem", "if True:print('oi')"], [sala_C.leste, "não desista", "if True:print('oi')"], [sala_C.oeste, "não é tão complicado", "if True:print('oi')"], [sala_C.sul, "avai sim", "if True:print('oi')"], [sala_D.norte, "tudo vai bem", "if True:print('oi')"], [sala_D.leste, "não desista", "if True:print('oi')"], [sala_D.oeste, "não é tão complicado", "if True:print('oi')"], [sala_D.sul, "avai sim", "if True:print('oi')"], [sala_E.norte, "tudo vai bem", "if True:print('oi')"], [sala_E.leste, "não desista", "if True:print('oi')"], [sala_E.oeste, "não é tão complicado", "if True:print('oi')"], [sala_E.sul, "não é tão complicado", "if True:print('oi')"], ] STYLE = dict(width=400, heigth="250px", left=400, top=100, visibility="hidden", opacity=0) #STYLE = dict(width=400,heigth="250px",left=400,top=100, visibility= "visible", opacity= 1) [ Codigo(cena=a, topo=b, codigo=c, style=STYLE) for a, b, c in MENSAGENS ] pedra = Elemento(img=PEDRA, tit="Pedra", style=dict(left=40, top=380, width=200, height="150px")) pedra.entra(sala_7.oeste) pedra.vai
def __init__(self): sala_0 = Sala(S0_NORTE, S0_LESTE, S0_SUL, S0_OESTE) sala_1 = Sala(S1_NORTE, S1_LESTE, S1_SUL, S1_OESTE) sala_2 = Sala(S2_NORTE, S2_LESTE, S2_SUL, S2_OESTE) sala_3 = Sala(S3_NORTE, S3_LESTE, S3_SUL, S3_OESTE) sala_4 = Sala(S4_NORTE, S4_LESTE, S4_SUL, S4_OESTE) sala_5 = Sala(S5_NORTE, S5_LESTE, S5_SUL, S5_OESTE) sala_6 = Sala(S6_NORTE, S6_LESTE, S6_SUL, S6_OESTE) sala_7 = Sala(S7_NORTE, S7_LESTE, S7_SUL, S7_OESTE) sala_7A = Sala(S7A_NORTE, S7A_LESTE, S7A_SUL, S7A_OESTE) sala_7B = Sala(S7B_NORTE, S7B_LESTE, S7B_SUL, S7B_OESTE) sala_8 = Sala(S8_NORTE, S8_LESTE, S8_SUL, S8_OESTE) sala_9 = Sala(S9_NORTE, S9_LESTE, S9_SUL, S9_OESTE) sala_10 = Sala(S10_NORTE, S10_LESTE, S10_SUL, S10_OESTE) sala_11 = Sala(S11_NORTE, S11_LESTE, S11_SUL, S11_OESTE) sala_12 = Sala(S12_NORTE, S12_LESTE, S12_SUL, S12_OESTE) Labirinto(sala_0, None, sala_1, sala_12, None) Labirinto(sala_2, sala_1, sala_3, None, None) Labirinto(sala_4, None, sala_5, sala_3, None) Labirinto(sala_6, None, sala_7, None, sala_5) Labirinto(sala_7A, None, None, sala_7B, sala_7) Labirinto(sala_8, sala_7, None, None, sala_9) Labirinto(sala_10, None, sala_9, None, sala_11) Labirinto(sala_11, None, sala_10, None, sala_12) sala_0.leste.vai()
# elizabeth.rachel.main.py from _spy.vitollino.main import Cena, Sala """A Sala é uma COLEÇÃO de cenas organizadas nos pontos cadeais norte, sul, leste e oeste """ = "https://i.imgur.com/l1LeZ9x.jpeg" # Extensões aceitas: png, jpg, jpeg e gif IMAGEM_OESTE = "https://i.imgur.com/o7cml0T.jpeg" # Extensões aceitas: png, jpg, jpeg e gif nome_da_cena_norte = Cena(IMAGEM_LESTE) nome_da_cena_leste = Cena(IMAGEM_OESTE) """ Bem como na composição na Cena, a ausencia de Cena em algum dos pontos cardeais direciona para a SalaCenaNula()""" nome_da_sala = Sala(n=nome_da_cena_norte, l=nome_da_cena_leste) nome_da_sala.norte.vai() #nome_da_sala.oeste.vai()