Click to reopen instructions.

The goal here is to refactor the single function in this code, drawPicture, into several smaller functions. For the most part this will just be a matter of extracting chunks of code and wrapping them in functions that take appropriate arguments and making variables in the new functions into local variables as appropriate. Note: the comments in the code are landmarks to finding good chunks of code to extract. As a point of reference, in the original code, before I mushed everything into one functions I had 15 separate functions. Make sure all the new functions you define are top-level functions, not nested within other functions, and do not introduce any new global variables. Finally, remember to move in small steps, keeping the code working at all times.

When you are done submit a GitHub pull request of the branch and request me as a reviewer.

Put definitions here.

Revisions: