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

Adds RectangleShapeMixin #376

Merged
merged 20 commits into from
May 8, 2020
Merged

Adds RectangleShapeMixin #376

merged 20 commits into from
May 8, 2020

Conversation

pathunstrom
Copy link
Collaborator

@pathunstrom pathunstrom commented Dec 9, 2019

Includes moving away from the Sides interface on this new sprite type.

  • Sprite sides setters (top, left, right, bottom) and tests
  • Rewrite hypothesis tests to cover new sprites
  • SquareSpriteMixin (hook into tests)
  • RectangleSprite (concrete sprite that is Sprite, but doesn't have the size interface.)
  • Sprite to use SquareSpriteMixin
  • Camera to use RectangleShapeMixin
  • Sprite.side_center or Sprite.side_middle

Closes #372
Closes #339

Copy link
Member

@AstraLuma AstraLuma left a comment

Choose a reason for hiding this comment

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

Are the setters planned?

@pathunstrom
Copy link
Collaborator Author

Yup. Mostly threw the properties at it to get the shape of the thing.

ppb/sprites.py Outdated Show resolved Hide resolved
ppb/sprites.py Outdated Show resolved Hide resolved
ppb/sprites.py Show resolved Hide resolved
ppb/sprites.py Outdated Show resolved Hide resolved
@pathunstrom pathunstrom marked this pull request as ready for review May 7, 2020 00:08
@pathunstrom pathunstrom requested a review from a team as a code owner May 7, 2020 00:08
Copy link
Member

@AstraLuma AstraLuma left a comment

Choose a reason for hiding this comment

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

We should probably mention somewhere that the rectangle properties don't follow rotation.

@AstraLuma
Copy link
Member

bors r+

@pathunstrom pathunstrom added the bors Someone has bors r+ this PR label May 8, 2020
@bors
Copy link
Contributor

bors bot commented May 8, 2020

@bors bors bot merged commit 93f177a into ppb:master May 8, 2020
bors bot added a commit that referenced this pull request May 15, 2020
466: Rectangular sprite rendering r=pathunstrom a=astronouth7303

Handles rendering for #376 

Closes #356 

Co-authored-by: Jamie Bliss <jamie@ivyleav.es>
@pathunstrom pathunstrom deleted the destroy-sides branch October 24, 2020 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bors Someone has bors r+ this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-square sprites Sides refactor
2 participants