Skip to content

Create SpaceCounter.py - #160

Closed
shiventi wants to merge 4 commits into
code4tomorrow:masterfrom
shiventi:master
Closed

shiventi wants to merge 4 commits into
code4tomorrow:masterfrom
shiventi:master

Conversation

@shiventi

Copy link
Copy Markdown
Collaborator

No description provided.

@hpanchal092 hpanchal092 left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would change the name of the file to SpaceCounter.py, to match with the file names of the other problems in the github. Drop the word solution as it is redundant because the file is in the solutions directory already. Change the formatting to match black and flake8. Add a comment at the top detailing the specifications of the problem (just copy paste it from notion), and add this to the template code as well. Also I would add a boolean variable run set to true, and set it to false when the quit event is triggered (this is to match semantics taught in the python games course). Finally, move the pygame.quit() to the outside of the loop as it is not triggered because you break out of the loop too early.

@shiventi shiventi changed the title Create space_counter_solution.py Create SpaceCounter.py May 26, 2022

@hpanchal092 hpanchal092 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

add pygame.quit() to the last line

display_counter += 1

# Updates the data
pygame.display.update()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

add pygame.quit() to the last line

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

everything else looks good

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

sorry my bad.

@hpanchal092

Copy link
Copy Markdown
Collaborator

Closing because the PR was made from a fork which causes checks to fail, see #161 for new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ Proxy