diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5afcf9d..a992cfd 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,8 +4,9 @@
+
-
+
@@ -103,6 +104,7 @@
+
@@ -110,22 +112,22 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
@@ -142,12 +144,12 @@
-
+
-
+
-
+
\ No newline at end of file
diff --git a/__pycache__/definitions.cpython-37.pyc b/__pycache__/definitions.cpython-37.pyc
index 601248d..0d34f9c 100644
Binary files a/__pycache__/definitions.cpython-37.pyc and b/__pycache__/definitions.cpython-37.pyc differ
diff --git a/__pycache__/map.cpython-37.pyc b/__pycache__/map.cpython-37.pyc
index 7e8fb74..549db50 100644
Binary files a/__pycache__/map.cpython-37.pyc and b/__pycache__/map.cpython-37.pyc differ
diff --git a/__pycache__/tractor.cpython-37.pyc b/__pycache__/tractor.cpython-37.pyc
index 5db1e20..668045a 100644
Binary files a/__pycache__/tractor.cpython-37.pyc and b/__pycache__/tractor.cpython-37.pyc differ
diff --git a/definitions.py b/definitions.py
index 1a9fd1a..2ee2ec4 100644
--- a/definitions.py
+++ b/definitions.py
@@ -45,8 +45,14 @@ SPONGE = pygame.image.load(os.path.join('resources', 'sponge.png'))
SPONGE = pygame.transform.scale(SPONGE, (BLOCK_SIZE, BLOCK_SIZE))
STATION = pygame.image.load(os.path.join('resources', 'rail_normal.png'))
STATION = pygame.transform.scale(STATION, (BLOCK_SIZE, BLOCK_SIZE))
-TRACTOR = pygame.image.load(os.path.join('resources', 'minecart_command_block.png'))
-TRACTOR = pygame.transform.scale(TRACTOR, (BLOCK_SIZE, BLOCK_SIZE))
+TRACTOR_DIRECTION_EAST_TEXTURE = pygame.image.load(os.path.join('resources', 'minecart_command_block_east.png'))
+TRACTOR_DIRECTION_EAST_TEXTURE = pygame.transform.scale(TRACTOR_DIRECTION_EAST_TEXTURE, (BLOCK_SIZE, BLOCK_SIZE))
+TRACTOR_DIRECTION_NORTH_TEXTURE = pygame.image.load(os.path.join('resources', 'minecart_command_block_north.png'))
+TRACTOR_DIRECTION_NORTH_TEXTURE = pygame.transform.scale(TRACTOR_DIRECTION_NORTH_TEXTURE, (BLOCK_SIZE, BLOCK_SIZE))
+TRACTOR_DIRECTION_SOUTH_TEXTURE = pygame.image.load(os.path.join('resources', 'minecart_command_block_south.png'))
+TRACTOR_DIRECTION_SOUTH_TEXTURE = pygame.transform.scale(TRACTOR_DIRECTION_SOUTH_TEXTURE, (BLOCK_SIZE, BLOCK_SIZE))
+TRACTOR_DIRECTION_WEST_TEXTURE = pygame.image.load(os.path.join('resources', 'minecart_command_block_west.png'))
+TRACTOR_DIRECTION_WEST_TEXTURE = pygame.transform.scale(TRACTOR_DIRECTION_WEST_TEXTURE, (BLOCK_SIZE, BLOCK_SIZE))
TRACTOR_DIRECTION_EAST = 2
TRACTOR_DIRECTION_NORTH = 1
TRACTOR_DIRECTION_SOUTH = 3
diff --git a/map.py b/map.py
index e17419a..f06ea70 100644
--- a/map.py
+++ b/map.py
@@ -81,7 +81,14 @@ class Map:
elif block != definitions.DIRT or block != definitions.FARMLAND_DRY or block != definitions.FARMLAND_WET:
definitions.WINDOW.blit(definitions.FARMLAND_WET, (rect.x, rect.y))
definitions.WINDOW.blit(block, (rect.x, rect.y))
- def draw_window(self, tractor1_rect): #rysuje mapÄ™
+ def draw_window(self, tractor1, tractor1_rect): #rysuje mapÄ™
self.fill_map()
- definitions.WINDOW.blit(definitions.TRACTOR, (tractor1_rect.x, tractor1_rect.y))
+ if tractor1.get_direction() == definitions.TRACTOR_DIRECTION_EAST:
+ definitions.WINDOW.blit(definitions.TRACTOR_DIRECTION_EAST_TEXTURE, (tractor1_rect.x, tractor1_rect.y))
+ elif tractor1.get_direction() == definitions.TRACTOR_DIRECTION_NORTH:
+ definitions.WINDOW.blit(definitions.TRACTOR_DIRECTION_NORTH_TEXTURE, (tractor1_rect.x, tractor1_rect.y))
+ elif tractor1.get_direction() == definitions.TRACTOR_DIRECTION_SOUTH:
+ definitions.WINDOW.blit(definitions.TRACTOR_DIRECTION_SOUTH_TEXTURE, (tractor1_rect.x, tractor1_rect.y))
+ elif tractor1.get_direction() == definitions.TRACTOR_DIRECTION_WEST:
+ definitions.WINDOW.blit(definitions.TRACTOR_DIRECTION_WEST_TEXTURE, (tractor1_rect.x, tractor1_rect.y))
pygame.display.update()
\ No newline at end of file
diff --git a/py.py b/py.py
index 447f6b0..1f3464d 100644
--- a/py.py
+++ b/py.py
@@ -22,7 +22,7 @@ def main():
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
- map1.draw_window(tractor1_rect)
+ map1.draw_window(tractor1, tractor1_rect)
tractor1.tractor1_handle_movement(tractor1_rect)
tractor1.do_work(map1, station1, tractor1_rect)
plant.Plant.grow_plants(map1)
diff --git a/resources/minecart_command_block_east.png b/resources/minecart_command_block_east.png
new file mode 100644
index 0000000..52efbd0
Binary files /dev/null and b/resources/minecart_command_block_east.png differ
diff --git a/resources/minecart_command_block_north.png b/resources/minecart_command_block_north.png
new file mode 100644
index 0000000..b6aba75
Binary files /dev/null and b/resources/minecart_command_block_north.png differ
diff --git a/resources/minecart_command_block_south.png b/resources/minecart_command_block_south.png
new file mode 100644
index 0000000..0523f9e
Binary files /dev/null and b/resources/minecart_command_block_south.png differ
diff --git a/resources/minecart_command_block.png b/resources/minecart_command_block_west.png
similarity index 100%
rename from resources/minecart_command_block.png
rename to resources/minecart_command_block_west.png