Guest User

Untitled

a guest
Apr 11th, 2024
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | Source Code | 0 0
  1. import pygame and sys
  2.  
  3. call init of pygame
  4.  
  5. this is set up the screen
  6. set WIDTH and HEIGHT to 800 and 600
  7.  
  8. set screen to call set_mode of display of pygame with tuple WIDTH and HEIGHT
  9.  
  10. call set_caption of display of pygame with "Pong"
  11.  
  12. this is set up the paddles
  13. set player_paddle to call Rect of pygame with 50 and HEIGHT div two sub PADDLE_HEIGHT div two and PADDLE_WIDTH and PADDLE_HEIGHT
  14.  
  15. this is game loop
  16. while True
  17. for event in get of event of pygame
  18. if event it's type is it QUIT of pygame
  19. call quit of pygame
  20. call exit of sys
Advertisement
Add Comment
Please, Sign In to add comment