Browse Source

Spieloberflaeche wurde erstellt

Kristin 7 years ago
parent
commit
e34c17f08d
1 changed files with 20 additions and 0 deletions
  1. 20 0
      pingpong.py

+ 20 - 0
pingpong.py

@@ -1,3 +1,23 @@
1 1
 # Programmierung 2 - Ping Pong Spiel
2 2
 # Willi Schlegel, Francine Theil, Kristin Weber
3 3
 # letzte Aenderung: 19.07.2017
4
+
5
+# Import der einzelnen Module
6
+import random as r
7
+import time
8
+from Tkinter import *
9
+
10
+# ----------------------------------------------------------------
11
+# Spieloberflaeche
12
+
13
+tk = Tk()
14
+tk.title("Superfantastisches Ping-Pong-Spiel")
15
+canvas = Canvas(tk, width=500, height=400, bd=3, bg='pink')
16
+canvas.pack()
17
+label = canvas.create_text(10, 10, anchor=NW, text="Punktestand: 0")
18
+tk.update()
19
+paddle = Paddle(canvas, 'black')
20
+ball = Ball(canvas, 'white', 25, paddle)
21
+
22
+#----------------------------------------------------------------
23
+