![]() ![]() 1) Display game over when I lose, 2) counting the score and displaying it, 3) Delaying the start (by 1 sec), 4) stopping both ball and paddle from moving after i lose. ![]() Now after reading the book and understanding most parts, I tried to recreate the game alone and adding some extra stuff. Self.id = canvas.create_rectangle(0, 0, 100, 10, fill=color) If pos >= paddle_pos and pos = paddle_pos and pos = self.canvas_height: Tk.resizable(0,0) # tk window cannot be resized in x or yĬanvas = Canvas(tk, width=500, height=400, bd=0, highlightthickness=0) #no borders around the canvasĭef _init_(self, canvas, paddle, color): The final code looks like this: from Tkinter import * I 've been reading from a book called "Python for kids" where it has step by step, how to create the bounce ball game. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |