## My while loop tuple. Could x y z represent coordinates?
import pygame
from pygame.locals import*
import math
from sys import exit
from random import randint
R = 2
G = 0
B = 0
def run():
pygame.init()
screen= pygame.display.set_mode((800, 800))
clock = pygame.time.Clock()
while True:
for event in pygame.event.get():
if event.type == QUIT:
exit()
x = 2
R = 0
G = 0
B = 0
y = 0
z = 0
while (x > 1):
R = R + 51
G = 0
B = 0
pygame.draw.circle(screen, (R, G, B), (200, 200), 100)
clock.tick(2)
pygame.display.update()
if R == 255 :
y = 2
x = 0
while (y > 1):
R = 0
G = G + 51
B = 0
pygame.draw.circle(screen, (R, G, B), (200, 200), 100)
clock.tick(2)
pygame.display.update()
if G == 255:
z = 2
y = 0
while (z > 1):
R = 0
G = 0
B = B + 51
pygame.draw.circle(screen, (R, G, B), (200, 200), 100)
clock.tick(2)
pygame.display.update()
if B == 255:
z = 0
run()
import pygame
from pygame.locals import*
import math
from sys import exit
from random import randint
R = 2
G = 0
B = 0
def run():
pygame.init()
screen= pygame.display.set_mode((800, 800))
clock = pygame.time.Clock()
while True:
for event in pygame.event.get():
if event.type == QUIT:
exit()
x = 2
R = 0
G = 0
B = 0
y = 0
z = 0
while (x > 1):
R = R + 51
G = 0
B = 0
pygame.draw.circle(screen, (R, G, B), (200, 200), 100)
clock.tick(2)
pygame.display.update()
if R == 255 :
y = 2
x = 0
while (y > 1):
R = 0
G = G + 51
B = 0
pygame.draw.circle(screen, (R, G, B), (200, 200), 100)
clock.tick(2)
pygame.display.update()
if G == 255:
z = 2
y = 0
while (z > 1):
R = 0
G = 0
B = B + 51
pygame.draw.circle(screen, (R, G, B), (200, 200), 100)
clock.tick(2)
pygame.display.update()
if B == 255:
z = 0
run()
No comments:
Post a Comment