Created
July 20, 2016 21:38
-
-
Save mgalgs/588834aa3be3f4e4525a822cf703b53b to your computer and use it in GitHub Desktop.
pygame demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame as pg | |
pg.init() | |
width = 500 | |
height = 500 | |
screen = pg.display.set_mode((width, height)) | |
# (x, y) coordinates. We'll put it right in the middle. | |
x = width / 2 | |
y = height / 2 | |
for radius in range(100, 0, -1): | |
red = 255 | |
green = radius * 2 # just to make the color change | |
blue = 0 | |
pg.draw.circle(screen, (red, green, blue), (x, y), radius) | |
# this makes the screen actually update: | |
pg.display.flip() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment