Poprawka w odświeżaniu mapy

This commit is contained in:
andrzej 2020-04-06 15:18:00 +02:00
parent dae93da39d
commit 440aab0adc

View File

@ -2,6 +2,7 @@ import pygame
import warehouse
import agent
import random
import sys
from attributes import PackSize, PackStatus
WINDOW_SIZE = (600, 600)
@ -28,13 +29,17 @@ class MainGameFrame:
self.display = pygame.display.set_mode(WINDOW_SIZE)
self.warehouse_map = warehouse.Warehouse(20, 20, 150, 20)
starting_x, starting_y = self.set_starting_agent_position()
self.agent = agent.Agent(starting_x, starting_y, self.warehouse_map ,20)
self.agent = agent.Agent(starting_x, starting_y, self.warehouse_map, 20)
def run(self):
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
self.draw_floor()
self.draw_packages()
self.draw_agent()
while True:
pygame.display.update()
def draw_floor(self):