|
@@ -0,0 +1,46 @@
|
|
|
|
+#14.06.2018
|
|
|
|
+#Linda Napieralski
|
|
|
|
+#Andre Giesbrecht
|
|
|
|
+#Alexa Tschernitschek
|
|
|
|
+
|
|
|
|
+#Modul importieren
|
|
|
|
+import Tkinter as tk
|
|
|
|
+import turtle
|
|
|
|
+
|
|
|
|
+#Hauptfenster erstellen
|
|
|
|
+Hauptfenster = tk.Tk()
|
|
|
|
+Hauptfenster.title ("Roboter") #Fenstertitel
|
|
|
|
+cv = tk.Canvas(Hauptfenster, width=600, height=600, background= "white") #canvas=Zeichenflaeche
|
|
|
|
+cv.pack(side = tk.LEFT) #Zeichenflaeche links positionieren
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#Turtle_Fenster = Rasenfenster (gruen) erzeugen
|
|
|
|
+t = turtle.RawTurtle(cv)
|
|
|
|
+Rasen = t.getscreen()
|
|
|
|
+Rasen.setworldcoordinates(0,0,400,400)
|
|
|
|
+Rasen.bgcolor("green") #Hintergrundfarbe gruen
|
|
|
|
+
|
|
|
|
+#Frame auf der Rechten Seite
|
|
|
|
+frame= tk.Frame(Hauptfenster)
|
|
|
|
+frame.pack(side= tk.RIGHT, fill=tk.BOTH)
|
|
|
|
+
|
|
|
|
+pointLabel = tk.Label(frame,width = 50, height= 10)
|
|
|
|
+pointLabel.pack()
|
|
|
|
+
|
|
|
|
+#Start-Button
|
|
|
|
+button= tk.Button(frame)
|
|
|
|
+button ["text"] = "Start"
|
|
|
|
+button ["background"] = "blue"
|
|
|
|
+button.pack()
|
|
|
|
+ # Klick= Funktion
|
|
|
|
+
|
|
|
|
+Hauptfenster.mainloop()
|
|
|
|
+
|
|
|
|
+#Der Roboter
|
|
|
|
+t.goto(200,200)
|
|
|
|
+#turtle.goto(200,200)
|
|
|
|
+t.color("red")
|
|
|
|
+t.begin_fill()
|
|
|
|
+t.circle(20)
|
|
|
|
+t.end_fill()
|
|
|
|
+
|