|
@@ -1,4 +1,4 @@
|
1
|
|
-# Programmierung 2 - Ping Pong Spiel
|
|
1
|
+#Programmierung 2 - Ping Pong Spiel
|
2
|
2
|
# Willi Schlegel, Francine Theil, Kristin Weber
|
3
|
3
|
# letzte Aenderung: 19.07.2017
|
4
|
4
|
|
|
@@ -108,6 +108,15 @@ paddle = Paddle(canvas, 'black')
|
108
|
108
|
ball = Ball(canvas, 'white', 25, paddle)
|
109
|
109
|
|
110
|
110
|
|
|
111
|
+
|
|
112
|
+def button_action():
|
|
113
|
+ anweisungs_label.config(text=" ")
|
|
114
|
+
|
|
115
|
+exit_button = Button(tk, text="Spiel starten", command=tk.quit)
|
|
116
|
+exit_button.pack()
|
|
117
|
+# tk.mainloop()
|
|
118
|
+
|
|
119
|
+
|
111
|
120
|
#--------------------------------------------------------------------------
|
112
|
121
|
# Schleife fuer das fortlaufende Bewegen des Balles
|
113
|
122
|
|
|
@@ -120,3 +129,14 @@ while ball.hit_bottom == False:
|
120
|
129
|
tk.update()
|
121
|
130
|
time.sleep(0.01)
|
122
|
131
|
|
|
132
|
+while ball.hit_bottom == True:
|
|
133
|
+
|
|
134
|
+ ball.draw()
|
|
135
|
+ paddle.draw()
|
|
136
|
+ canvas.itemconfig(label, text="Highscore: "+str(0))
|
|
137
|
+ tk.update_idletasks()
|
|
138
|
+ tk.update()
|
|
139
|
+ time.sleep(0.01)
|
|
140
|
+
|
|
141
|
+# button_action()
|
|
142
|
+# tk.mainloop()
|