Skip to content
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

snake_game #275

Merged
merged 7 commits into from
Apr 2, 2024
Merged

Conversation

Anmol-Sharma21
Copy link
Contributor

@Anmol-Sharma21 Anmol-Sharma21 commented Mar 29, 2024

Pull Request

Feature Name: Snake Game

Changes made:

  1. removed the redundant files/folders:
  • .idea/
  • .pycache/
  1. removed the DS_store files

Issue num (must) - #276

Self Check(Tick After Making pull Request)

  • I have read and followed the Contribution Guidelines

  • This issue was assigned to me.

  • One Change in one Pull Request

  • My file is in the proper folder

  • PR is regarding Code

  • I am following clean code and Documentation and my code is well linted with flake8.

  • I am using external libraries and I have created requirements.txt in my project folder

  • Script is tested and running perfectly fine on my system

  • PR is regarding the documentation

If the issue was not assigned to you Please don't make a PR, It will be marked as invalid.

Discuss in discord server:- http://pragmaticprogrammer.in/discord

acknowledgment

  • I have tested my code and distributing it under GPL-3.0 License

Copy link
Owner

@Punit-Choudhary Punit-Choudhary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these redundant files/folders:

  • .idea/
  • pycache/

# Snake Game using Python

## Description
This is a classic Snake game implemented in Python using the Tkinter library for GUI. The game allows the player to control a snake which moves around the screen, eating food pellets and growing longer. The objective is to avoid colliding with the walls or the snake's own body while trying to eat as much food as possible to score points.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mentioned Tkinter, while project seems to be using turtle. If this is a typo, please fix.

@Anmol-Sharma21
Copy link
Contributor Author

made the needful changes in the file

Copy link
Owner

@Punit-Choudhary Punit-Choudhary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these unnecessary files:

  • .DS_Store
  • Project/.DS_Store

Please also lint your code using flake8 or any online code beautifier.

@Anmol-Sharma21
Copy link
Contributor Author

Anmol-Sharma21 commented Mar 29, 2024

removed the DS_store files and edited the description above

Copy link
Owner

@Punit-Choudhary Punit-Choudhary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please lint your code using flake8 or any online code beutifier.

@@ -0,0 +1 @@
15
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reset high score to 0

self.score = 0
self.update_scorebaord()

# def game_over(self):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove unused code

@Punit-Choudhary
Copy link
Owner

Please resolve these linting issues:

./Projects/snake_game/food.py:19:38: W292 no newline at end of file
./Projects/snake_game/main.py:35:80: E501 line too long (114 > 79 characters)
./Projects/snake_game/main.py:47:1: E303 too many blank lines (4)
./Projects/snake_game/scoreboard.py:16:80: E501 line too long (102 > 79 characters)
./Projects/snake_game/scoreboard.py:21:80: E501 line too long (102 > 79 characters)
./Projects/snake_game/snake.py:1:1: F403 'from turtle import *' used; unable to detect undefined names
./Projects/snake_game/snake.py:23:5: E303 too many blank lines (2)
./Projects/snake_game/snake.py:24:19: F405 'Turtle' may be undefined, or defined from star imports: turtle
./Projects/snake_game/snake.py:31:5: E303 too many blank lines (2)
./Projects/snake_game/snake.py:43:5: E303 too many blank lines (3)

@Punit-Choudhary
Copy link
Owner

./Projects/snake_game/main.py:35:80: E501 line too long (114 > 79 characters)
./Projects/snake_game/snake.py:1:1: F403 'from turtle import *' used; unable to detect undefined names
./Projects/snake_game/snake.py:10:1: E302 expected 2 blank lines, found 1
./Projects/snake_game/snake.py:22:19: F405 'Turtle' may be undefined, or defined from star imports: turtle

Please lint your code and resolve these.
Let me know if you want any help resolving these.

@Punit-Choudhary Punit-Choudhary added the Project Projects category label Apr 2, 2024
@Punit-Choudhary Punit-Choudhary merged commit 703df23 into Punit-Choudhary:main Apr 2, 2024
1 check passed
@Punit-Choudhary
Copy link
Owner

Thank you for the contribution 💜 🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project Projects category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants