From 2467b77adcdde18ec82cd7693b51e1d9168d2d3d Mon Sep 17 00:00:00 2001 From: Gabriela Piekarska Date: Tue, 8 Mar 2022 17:22:17 +0100 Subject: [PATCH] Update 'board' --- board | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/board b/board index 0c91d78..2096907 100644 --- a/board +++ b/board @@ -35,11 +35,14 @@ def draw(square_num, objectArr): ## tutaj rysujemy agenta i inne obiekty juz na gotowej mapie ## RYSUJEMY AGENTA - agent_color = (255, 0, 0) - circleX = objectArr[0].xPos * square + square / 2 + #agent_color = (255, 0, 0) + circleX = objectArr[0].xPos * square + square + square/ 2 #dodane jedno +square, by śmieciara nie wychodziła poza kratę circleY = objectArr[0].yPos * square - square / 2 - radius = 10 - pygame.draw.circle(screen, agent_color, (a + circleX, b + circleY), radius) + #radius = 10 + #pygame.draw.circle(screen, agent_color, (a + circleX, b + circleY), radius) + truck = pygame.image.load("C:/Users/gabi9/Downloads/car.png.png").convert_alpha() #tu ścieżka do zdjęcia w tle + truck = pygame.transform.scale(truck, (square, square)) + screen.blit(truck, (circleX, circleY)) def kb_listen(objectArray, gridLength): for event in pygame.event.get(): @@ -72,4 +75,4 @@ if __name__ == '__main__': screen.fill(c) draw(15, objectArray) kb_listen(objectArray, 15) - pygame.display.update() #by krata pojawiła się w okienku - update powierzchni \ No newline at end of file + pygame.display.update() #by krata pojawiła się w okienku - update powierzchni