gopher-snakes-2013/snapkins — pull request #11 by zspencer (2013-10-18 18:43:40+00:00)
Title: DO NOT MERGE - Zee refactors things

Hey snapkins!

Since I'm not there to judge your code in person, I spent some time refactoring it.

While working on code it's important to:

1. Keep your code DRY. You had two separate files responsible for your HTML with almost no difference between them. This is inherently confusing.
2. Ensure your app is working before merging into master. Check out the branch, run the code, *then* click the big green button once you've used your eyes to verify it actually works. Pull requests without critical review are a waste of time.
3. Break your problems down into smaller parts. You have code for determining what color the stroke should be. This is a small bit of functionality that doesn't need to have anything to do with the DOM, events, or canvas. It just needs to provide strings of colors based upon a small set of rules. Break that kind of stuff out in into objects or functions.