diff --git a/dzien_01/d_04_pong.py b/dzien_01/d_04_pong.py index ab0c889..0751e5b 100644 --- a/dzien_01/d_04_pong.py +++ b/dzien_01/d_04_pong.py @@ -1,4 +1,6 @@ import pgzrun +from random import randint + # Start programu WIDTH = 1000 HEIGHT = 676 @@ -9,6 +11,8 @@ sprite = Actor("ball.png") ship = Actor("ship.png") sprite.x = WIDTH//2 sprite.y = HEIGHT//2 +ship.x = randint(20,WIDTH-20) +ship.y = randint(20,HEIGHT-20) # Najważniejsze funkcje sterujące def update(): @@ -33,6 +37,7 @@ def update(): def draw(): screen.blit("tomulus64.jpg", (0,0) ) + ship.draw() sprite.draw() pgzrun.go() \ No newline at end of file