Diana negra y roja


/ Published in: Python
Save to your folder(s)

Una diana nueva y diferente


Copy this code and paste it in your HTML
  1. import pygame
  2. import sys
  3. from pygame . locals import *
  4. import random
  5. xcentro= 500
  6. ycentro= 500
  7. radio= 1
  8. linea= 1
  9. pygame.init()
  10.  
  11. #Configurar la ventana
  12. ancho = 1000
  13. alto = 1000
  14. ventana = pygame.display.set_mode((ancho, alto))
  15. radio = 1
  16. for variable in range(1000):
  17. radio= radio +15
  18. r=random.randint(0, 250)
  19. g=random.randint(0, 0)
  20. b=random.randint(0, 0)
  21. blanco=random.randint (0, 255)
  22. pygame.draw.circle(ventana, [r, g, b], (xcentro, ycentro), radio, linea)
  23. pygame.display.flip()
  24. #Bucle de eventos
  25. while True:
  26. for event in pygame.event.get():
  27. if event.type == QUIT:
  28. pygame.quit()
  29. sys.exit()

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.