Code: Alles auswählen
import random, pygame, sys
screen = pygame.display.set_mode ((1800, 1000))
colorx = ((100))
colory = ((100))
colorz = ((100))
color = (colorx, colory, colorz)
screen1 = random.randint(1, 255)
screen2 = random.randint(1, 255)
screen3 = random.randint(1, 255)
screen.fill ((screen1, screen2, screen3))
pygame.display.flip()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_UP:
Kreis_point = ((900, 500))
r = 20
pygame.draw.circle(screen, color, Kreis_point.r , 1)
pygame.display.update()
Was ist den "tuple" ?pygame.draw.circle (screen, color, points)
AttributeError: 'tuple' objekt has no attribute 'r'
Und was ist der Fehler in meinem Programm?