Merge pull request '464921' (#4) from 464921 into master

Reviewed-on: #4
Reviewed-by: Emil Gutkiewicz <emigut@st.amu.edu.pl>
This commit is contained in:
Emil Gutkiewicz 2022-03-08 22:33:34 +01:00
commit bd677d2f98
2 changed files with 8 additions and 2 deletions

BIN
dot-22-433567.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

10
main.py
View File

@ -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()