Skip to content

Edit example code in lessons#3

Open
s2t2 wants to merge 4 commits into
pathunstrom:masterfrom
s2t2:master
Open

Edit example code in lessons#3
s2t2 wants to merge 4 commits into
pathunstrom:masterfrom
s2t2:master

Conversation

@s2t2
Copy link
Copy Markdown

@s2t2 s2t2 commented Sep 7, 2017

These revisions get past some issues I was running into when getting to lesson 6 and 7 and 3.

@s2t2
Copy link
Copy Markdown
Author

s2t2 commented Sep 7, 2017

(although I'm at this time running into an error TypeError: '>=' not supported between instances of 'float' and 'NoneType' due to self.next_time = None in the Spawner initializer)

@s2t2
Copy link
Copy Markdown
Author

s2t2 commented Sep 7, 2017

Most recent push fixes #3 (comment).

@s2t2 s2t2 changed the title Resolve load error and erroneous file reference. Edit example code in lessons Sep 7, 2017
Copy link
Copy Markdown
Owner

@pathunstrom pathunstrom left a comment

Choose a reason for hiding this comment

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

Added two comments that need changes. When cleaned up, I can accept these changes.

Comment thread lessons/6-enemies.md
enemies = self.groups["enemy"]
groupcollide(player, enemies, True, True)
groupcollide(enemies, bullets, True, True)
self.spawner.spawn(time_delta)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is in lesson six, the scene doesn't have a spawner yet, so this will throw an error.

This line needs to be removed.

Comment thread lessons/3-first-sprite.md
(image.get_width() * 0.5,
image.get_height() * 0.5))
( int(image.get_width() * 0.5),
int(image.get_height() * 0.5)) )
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Code samples in this project follow PEP8, extra spaces around parentheses is not to style.

Could you remove them?

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