diff --git a/__pycache__/catcher.cpython-311.pyc b/__pycache__/catcher.cpython-311.pyc index ea740a9..a8fe93a 100644 Binary files a/__pycache__/catcher.cpython-311.pyc and b/__pycache__/catcher.cpython-311.pyc differ diff --git a/__pycache__/fruit.cpython-311.pyc b/__pycache__/fruit.cpython-311.pyc index 502d57e..49fc690 100644 Binary files a/__pycache__/fruit.cpython-311.pyc and b/__pycache__/fruit.cpython-311.pyc differ diff --git a/fruit.py b/fruit.py index 0b7ced6..59ca2dc 100644 --- a/fruit.py +++ b/fruit.py @@ -23,7 +23,7 @@ class Fruit: if y == 24: game.remove_agent(self) else: - catcher = game.get_agent_by_name('catcher') + catcher = game.get_agent_by_name("Player") new_position = (x, y + 1) if new_position == catcher.position: catcher.explode() @@ -50,14 +50,15 @@ class Fruit: if y == HEIGHT - 1: game.remove_agent(self) else: - ship = game.get_agent_by_name('ship') - new_position = (x, y + 1) + ship = game.get_agent_by_name("Player") + new_position = (x, y - 1) if new_position == ship.position: ship.explode() game.end() else: self.position = new_position + class FruitSpawner: display = False diff --git a/poetry.lock b/poetry.lock index 82548b3..d8610e3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.2.0 and should not be changed by hand. [[package]] name = "ansicon"