mit Linien zeichnen
This commit is contained in:
parent
e58a5081fb
commit
72834944a0
@ -1,19 +1,53 @@
|
|||||||
from galgenmaennchen import turtle, t, zeichenliste
|
from galgenmaennchen import turtle, t, zeichenliste
|
||||||
|
|
||||||
geheimwort = "Dampfmaschienenputzbürste"
|
geheimwort = "und"
|
||||||
t.hideturtle()
|
t.hideturtle()
|
||||||
linie = turtle.Pen()
|
linie = turtle.Pen()
|
||||||
linie.hideturtle()
|
linie.hideturtle()
|
||||||
|
|
||||||
for buchstabe in geheimwort:
|
geraten = ""
|
||||||
linie.fd(15)
|
|
||||||
linie.write(buchstabe, align="center", font="serif 12 bold")
|
def linienzeichnen():
|
||||||
linie.fd(15)
|
linie.home()
|
||||||
linie.up()
|
linie.clear()
|
||||||
linie.fd(20)
|
for buchstabe in geheimwort:
|
||||||
linie.down()
|
linie.fd(15)
|
||||||
|
if buchstabe in geraten:
|
||||||
|
linie.write(buchstabe, align="center", font="serif 12 bold")
|
||||||
|
linie.fd(15)
|
||||||
|
linie.up()
|
||||||
|
linie.fd(20)
|
||||||
|
linie.down()
|
||||||
|
|
||||||
|
linienzeichnen()
|
||||||
|
|
||||||
for grafik in zeichenliste:
|
for grafik in zeichenliste:
|
||||||
turtle.textinput("", "Welcher Buchstabe?")
|
gewonnen = "ja"
|
||||||
grafik()
|
|
||||||
|
neugeraten = turtle.textinput("", "Welcher Buchstabe?")
|
||||||
|
|
||||||
|
while (neugeraten in geheimwort) and (neugeraten not in geraten):
|
||||||
|
geraten = geraten + neugeraten
|
||||||
|
|
||||||
|
gewonnen = "ja"
|
||||||
|
for buchstabe in geheimwort:
|
||||||
|
if buchstabe in geraten:
|
||||||
|
print("drin")
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
gewonnen = "nein"
|
||||||
|
if gewonnen == "ja":
|
||||||
|
linie.goto(0,-100)
|
||||||
|
linie.write("gewonnen")
|
||||||
|
break
|
||||||
|
print("right")
|
||||||
|
linienzeichnen()
|
||||||
|
neugeraten = turtle.textinput("", "Welcher Buchstabe?")
|
||||||
|
else:
|
||||||
|
geraten = geraten + neugeraten
|
||||||
|
grafik()
|
||||||
|
|
||||||
|
if gewonnen == "ja":
|
||||||
|
linie.goto(0,-100)
|
||||||
|
linie.write("gewonnen")
|
||||||
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user