From 1ac8500c8fd8ced2596e0b89b0a71ba1a81f5070 Mon Sep 17 00:00:00 2001 From: MarRac Date: Sun, 14 Apr 2024 23:38:08 +0200 Subject: [PATCH] small fix in spawning rocks --- source/__pycache__/ground.cpython-311.pyc | Bin 1291 -> 1291 bytes source/__pycache__/tile.cpython-311.pyc | Bin 1843 -> 1930 bytes source/main.py | 4 ++-- source/tile.py | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/__pycache__/ground.cpython-311.pyc b/source/__pycache__/ground.cpython-311.pyc index e2c58ea9788a4eda91c44bf6de006c5e76512d41..23646331df662fc85bc9377544face0d08fe2000 100644 GIT binary patch delta 19 YcmeC?>gM8F&dbZi00bRg8@U)+0VnALlK=n! delta 19 YcmeC?>gM8F&dbZi00eUO8@U)+0VOsA9smFU diff --git a/source/__pycache__/tile.cpython-311.pyc b/source/__pycache__/tile.cpython-311.pyc index fbbfcf5baafbfdfefc05a02d133c7ec06ae6b18c..e6da2c6c5e6bca31c0bd1a33a4cc4e08c5b8b039 100644 GIT binary patch delta 272 zcmdnY*Tv7foR^o20SHokWYUgoU$@Fp+Q08R{keIxfMUjzn@=+FJ=^~KHMIa+J zS&BG8Y%w5li!rlEVKOJHJ!8*gPu4`e1uRS0R!Sa&4%>{Xz8$tvKR|$vJ`Ow<%`6C#4X0mBDu-#toDq>liOJnMQ=!2cDVF-bpYW9W=2k{ s4-7zJvKX7KlpIKlEQpW+5!@g`97HHi&ShJ~s5V)EU4l`4vL<^X09CRip8x;= diff --git a/source/main.py b/source/main.py index be431d0..3ee13c5 100644 --- a/source/main.py +++ b/source/main.py @@ -20,7 +20,7 @@ def main(): pygame.display.update() #getting coordinates of our "goal tile": - tile_index=245 + tile_index=127 tile_x, tile_y = get_tile_coordinates(tile_index) if tile_x is not None and tile_y is not None: print(f"Coordinates of tile {tile_index} are: ({tile_x}, {tile_y})") @@ -73,7 +73,7 @@ def main(): do_actions(tractor, WIN, moves) tractor.work_on_field(tile1, d1, p1) - time.sleep(15) + time.sleep(30) print("\n") diff --git a/source/tile.py b/source/tile.py index ba45e10..83758bf 100644 --- a/source/tile.py +++ b/source/tile.py @@ -44,7 +44,7 @@ class Tile: self.image = "resources/images/dirt.png" self.photo = "resources/images/background.jpg" ground = self.ground - if ground.obstacle: + if ground.obstacle and (self.x, self.y) != (170,100): #warunek po and do zmiany self.image = "resources/images/rock_dirt.png"