Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame and sys
- call init of pygame
- this is set up the screen
- set WIDTH and HEIGHT to 800 and 600
- set screen to call set_mode of display of pygame with tuple WIDTH and HEIGHT
- call set_caption of display of pygame with "Pong"
- this is set up the paddles
- 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
- this is game loop
- while True
- for event in get of event of pygame
- if event it's type is it QUIT of pygame
- call quit of pygame
- call exit of sys
Advertisement
Add Comment
Please, Sign In to add comment