Skip to content

Conversation

@kanishk7559
Copy link

I added Pause feature and i will add restart feature soon ! (press p for pause)

I added Pause feature and i will add restart feature soon ! (press p for pause)
@kanishk7559 kanishk7559 reopened this Aug 20, 2020
@Aviral14 Aviral14 self-requested a review August 20, 2020 17:25
if event.key==K_p:
pause = True

while pause == True:
Copy link
Owner

Choose a reason for hiding this comment

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

You need not compare a True value with itself, just : while pause: will do.

Copy link
Owner

@Aviral14 Aviral14 left a comment

Choose a reason for hiding this comment

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

Also, since this pull request refers to the issue #12 please add the restart feature in the same PR as well,so that the issue can be closed

Comment on lines +230 to +234
for event in pygame.event.get():
if event.type==KEYUP:
if event.key==K_p:
pause = True

Copy link
Owner

Choose a reason for hiding this comment

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

Also, use a formatter (eg. black) so that the code is in match with the rest.

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