forked from 20241144010013/20241144010013
config turnos
This commit is contained in:
parent
6387992312
commit
1e6459eece
|
@ -171,6 +171,53 @@ if gmode == "single":
|
||||||
#sair
|
#sair
|
||||||
if bullet.pos() == (1000, 1000):
|
if bullet.pos() == (1000, 1000):
|
||||||
break
|
break
|
||||||
|
|
||||||
|
#tiro inimigo
|
||||||
|
tiro_e = tl.Turtle()
|
||||||
|
tiro_e.hideturtle()
|
||||||
|
|
||||||
|
#acerto Submarino
|
||||||
|
if (tiro_pos[tiro_e]) == p1.pos():
|
||||||
|
bullet.showturtle()
|
||||||
|
bullet.goto(tiro_pos[tiro_e])
|
||||||
|
print("Acerto!")
|
||||||
|
bullet.write("U-boat Afundado\n Capitão!",False,align="center")
|
||||||
|
bullet.hideturtle()
|
||||||
|
e1.goto(-1000,-1000)
|
||||||
|
#acerto Crusador
|
||||||
|
elif (tiro_pos[tiro]) == p2.pos():
|
||||||
|
bullet.showturtle()
|
||||||
|
bullet.goto(tiro_pos[tiro])
|
||||||
|
print("Acerto!")
|
||||||
|
bullet.write("Crusador Afundado\n Capitão!",False,align="center")
|
||||||
|
bullet.hideturtle()
|
||||||
|
e2.goto(-1000,-1000)
|
||||||
|
#acerto Destroyer
|
||||||
|
elif(tiro_pos[tiro_e]) == p3.pos():
|
||||||
|
bullet.showturtle()
|
||||||
|
bullet.goto(tiro_pos[tiro_e])
|
||||||
|
print("Acerto!")
|
||||||
|
bullet.write("Destroyer Afundado\n Capitão!",False,align="center")
|
||||||
|
bullet.hideturtle()
|
||||||
|
e3.goto(-1000,-1000)
|
||||||
|
#erro
|
||||||
|
elif (tiro_pos[tiro_e]) != p1.pos() and (tiro_pos[tiro_e]) != p2.pos() and (tiro_pos[tiro_e]) != p3.pos():
|
||||||
|
bullet.showturtle()
|
||||||
|
bullet.goto(tiro_pos[tiro_e])
|
||||||
|
print("errou!")
|
||||||
|
bullet.write("Erramos o alvo\n Capitão!",False,align="center")
|
||||||
|
bullet.hideturtle()
|
||||||
|
#vencer
|
||||||
|
if (p1.pos() == (-1000, -1000)) and (p2.pos() == (-1000, -1000)) and (p3.pos() == (-1000, -1000)):
|
||||||
|
print("voçe ganhou")
|
||||||
|
break
|
||||||
|
#sair
|
||||||
|
if tiro_e.pos() == (1000, 1000):
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -249,6 +296,8 @@ elif gmode == "multi":
|
||||||
continue
|
continue
|
||||||
#partidas
|
#partidas
|
||||||
|
|
||||||
|
#TELA DE VITORIA
|
||||||
|
|
||||||
#Execução
|
#Execução
|
||||||
tl.mainloop()
|
tl.mainloop()
|
||||||
tl.exitonclick()
|
tl.exitonclick()
|
||||||
|
|
Loading…
Reference in New Issue