Skip to content

Instantly share code, notes, and snippets.

@stevepentler
Last active April 11, 2016 18:38
Show Gist options
  • Save stevepentler/1f9b2249fd44248732b395d2c93599aa to your computer and use it in GitHub Desktop.
Save stevepentler/1f9b2249fd44248732b395d2c93599aa to your computer and use it in GitHub Desktop.

###Pull Request

  • @jecrockett - refactor partner
  • @rrgayhart - instructor
  • @dastinnette - member of another refactor team, please review!

####What's this PR do? Abstracts draw object functionality into a canvasPainter object. This removes responsibilities from the generateFish function in the game class.

####Where should the reviewer start? The canvasPainter object is exported Game object, then called in the drawObjects function rather than the generateFish function. This is more appropriate for single responsibility principles.

####How should this be manually tested? This method draws to the canvas, which is hard to test. However, extracting this functionality will improve our ability to test generateFish and other fish properties that are not canvas related.

####Any background context you want to provide? This is step one of the canvasPainter object. Eventually, the canvasPainter will be responsible for drawing the boat and bullet objects as well.

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

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