464921 #4
10
main.py
10
main.py
@ -3,20 +3,26 @@ import pygame
|
||||
WIDTH, HEIGHT = 800, 800
|
||||
WIN = pygame.display.set_mode((WIDTH, HEIGHT))
|
||||
pygame.display.set_caption("Sztuczna Inteligencja")
|
||||
FPS = 30
|
||||
AGENT_IMG = pygame.image.load("dot-22-433567.png")
|
||||
AGENT = pygame.transform.scale(AGENT_IMG, (50, 50))
|
||||
|
||||
|
||||
def draw_window():
|
||||
def draw_window(agent):
|
||||
WIN.fill((255,255,255))
|
||||
WIN.blit(AGENT, (agent.x, agent.y))
|
||||
pygame.display.update()
|
||||
|
||||
def main():
|
||||
clock = pygame.time.Clock()
|
||||
run = True
|
||||
agent = pygame.Rect(0, 0, 50, 50)
|
||||
|
||||
while run:
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
run = False
|
||||
draw_window()
|
||||
draw_window(agent)
|
||||
|
||||
pygame.quit()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user