-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing argument in Food class constructor #3
base: main
Are you sure you want to change the base?
Conversation
…g a new instance of the `Food` class
when I run main, I still got Traceback (most recent call last): ds |
when I run main, I still got Traceback (most recent call last): |
hi:revert |
1 similar comment
hi:revert |
de117cd
to
4c08408
Compare
Description
This PR fixes the issue where the
Food
class insnake_game_py/food.py
was missing a required positional argumentsnake_segments
in its constructor. The error occurred when creating a new instance of theFood
class in theGame
class's__init__
method.Summary of Changes
__init__
method of theFood
class insnake_game_py/food.py
to include thesnake_segments
argument.snake.segments
as thesnake_segments
argument when creating a new instance of theFood
class in theGame
class's__init__
method insnake_game_py/game.py
.Fixes #1.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.