# Example file showing a circle moving on screen
import pygame
# pygame setup
pygame.init()
screen = pygame.display.set_mode((1280, 720))
clock = pygame.time.Clock()
running = True
dt = 0
changed = False
a = [390, 540, 690, 840]
b = [100, 250, 400, 550]
player_pos = pygame.Vector2(screen.get_width() / 2, screen.get_height() / 2)
while running:
# poll for events
# pygame.QUIT event means the user clicked X to close your window
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# fill the screen with a color to wipe away anything from last frame
screen.fill("white")
font = pygame.font.SysFont(None, 100, True, False)
text = font.render('2', False, 'black', None)
pygame.draw.rect(screen, 'black', (340, 60, 600, 600), 8)
pygame.draw.rect(screen, 'black', (480, 60, 160, 600), 8)
pygame.draw.rect(screen, 'black', (632, 60, 160, 600), 8)
pygame.draw.rect(screen, 'black', (340, 200, 600, 160), 8)
pygame.draw.rect(screen, 'black', (340, 352, 600, 160), 8)
# flip() the display to put your work on screen
pygame.display.flip()
# limits FPS to 60
# dt is delta time in seconds since last frame, used for framerate-
# independent physics.
dt = clock.tick(60) / 1000
pygame.quit()top of page

실제 작동 상태를 확인하려면 라이브 사이트로 이동하세요.
2025-08-29
2025-08-29
댓글 0개
좋아요
댓글(0)
더 이상 게시물에 대한 댓글 기능이 지원되지 않습니다. 자세한 사항은 사이트 소유자에게 문의하세요.
bottom of page


