Advertisement
albertohilal

Clase 10 ejercicio-01

Oct 16th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. import pygame
  2. import sys
  3. BLANCO = (255, 255, 255)
  4. ROJO = (255, 0, 0)
  5. MEDIDA_PANTALLA = (640, 480)
  6. def DibujarPantalla(pantalla):
  7. posicion = (320, 240)
  8. pygame.draw.circle(pantalla, ROJO, posicion, 239, 2)
  9. def EjecutarCiclo():
  10. pygame.init()
  11. pantalla = pygame.display.set_mode( MEDIDA_PANTALLA )
  12. reloj = pygame.time.Clock()
  13. while True:
  14. pantalla.fill(BLANCO)
  15. DibujarPantalla(pantalla)
  16. pygame.display.flip()
  17. tick = reloj.tick(60)
  18. if __name__ == "__main__":
  19. EjecutarCiclo()
  20. def Pelota(pantalla, posicion):
  21. pygame.draw.circle(pantalla, ROJO, posicion, 50)
  22. def DibujarPantalla(pantalla):
  23. posicion = (320, 240)
  24. Pelota(pantalla, posicion)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement