“Compilador de pygame online com sprites” Respostas de código

Compilador de pygame online com sprites

import pygame
background_colour = (255,255,255)
(width, height) = (300, 200)
screen = pygame.display.set_mode((width, height))
pygame.display.set_caption('Tutorial 1')
screen.fill(background_colour)
pygame.display.flip()
running = True
while running:
  for event in pygame.event.get():
    if event.type == pygame.QUIT:
      running = False
Depressed Dog

Compilador de pygame online com sprites

import pygame
pygame.init()
dis=pygame.display.set_mode((400,300))
 
pygame.display.set_caption('Snake game by Pythonist')
 
blue=(0,0,255)
red=(255,0,0)
 
game_over=False
while not game_over:
    for event in pygame.event.get():
        if event.type==pygame.QUIT:
            game_over=True
    pygame.draw.rect(dis,blue,[200,150,10,10])
    pygame.display.update()
pygame.quit()
quit()
Tired Tarantula

Respostas semelhantes a “Compilador de pygame online com sprites”

Perguntas semelhantes a “Compilador de pygame online com sprites”

Mais respostas relacionadas para “Compilador de pygame online com sprites” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código