Skip to content

Instantly share code, notes, and snippets.

@PenneyGadget
Last active April 11, 2016 18:11
Show Gist options
  • Save PenneyGadget/4acf13973302d134b613f8e69f948cae to your computer and use it in GitHub Desktop.
Save PenneyGadget/4acf13973302d134b613f8e69f948cae to your computer and use it in GitHub Desktop.
Refactor Tractor Pull Requests

One: PenneyGadget/game-time#29

What's this PR do?

Several things - it cleans up the math a bit, shortening lines of code and making them more readable. It extract arrays of game data into their own classes. And finally it fixes a math typo that was causing our quadArc shape to draw incorrectly.

Where should the reviewer start?

No real starting point, these are just straight-forward extractions and fixes.

How should this be manually tested?

By playing the game and noting that the quadArc draw correctly and the game still works!

Any background context you want to provide?

The extractions are the continuation of the very Agile way Beth and I built this project. We started with everything in the Game class and slowly over time have pulled logic out into their own classes, workly in clear iterations.

Screenshots (if appropriate)

This is the quadArc rendering incorrectly, before the refactor. Broken quadArc

What gif best describes this PR or how it makes you feel?

Yippee!

Two: PenneyGadget/game-time#33

What's this PR do?

It deletes a lot of repetitive lines of code in lieu of one line of dynamic code that references a shapes array.

Where should the reviewer start?

At the beginnng ;)

How should this be manually tested?

I just tested this by making sure the game was still functioning properly and playable.

Any background context you want to provide?

This was a refactor based on Steve's suggestions during our final eval for the project.

Screenshots (if appropriate)

N/A

What gif best describes this PR or how it makes you feel?

Above giphy works for this one too ;)

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