Exercise 9
Due: Wednesday, July 24, 11:59:59 PM EST.
1 Revising Assignment 2
Revise your solution to Assignment 2: Snek to fix any issue and improve your code. Submitting a revision earns you full credit. Your revisions will be graded and substituted for your assignment 2 grade (if it is higher than your original grade).
You must do the following to get credit (not doing these things means you will not only not get credit for this exercise, but your assignment 2 score will remain unchanged):
Name your file assign2-revised.rkt; submit this and only this file.
- Make sure the top of your file contains the following:
;; Assignment 2, revised ;; Name: ...your name here... - Below your name, add a section of comments that has a bulleted list of changes. For example:
;; CHANGES: ;; ;; * Added signatures for all functions. ;; * Added tests for image producing functions. ;; * Properly indented code. ;; * Fixed food and bug collision detection. Graders will only check for the changes you list here, so if you do work that you want credit for, you need to describe it concisely in this section.
If you have no changes to make, you must still follow the above directions and write “no changes” in the CHANGES section in order to get credit for the exercise; your assignment 2 score will stay as it is.
Things that are worth doing to improve your score on assignment 2:
Follow all the directions of the assignment.
Make sure the program does not crash while playing.
Make sure the program behaves correctly when playing.
Follow the design recipe.
For every function, have a correct signature.
For every function, have a concise, descriptive purpose statement.
For every function, the design should either follow the structure of the data or consist of a composition of other functions.
For every function except main, have a good set of tests that serve as examples of using the function.
For every function except main, have complete test coverage: no halloween colors left after running the tests.
Adhere to the “one task, one function” mantra. This means using helper functions when appropriate. It should result in small, readable function definitions that clearly carry out the function’s purpose.
Use defined constants so that changing the basic parameters of the game is easy. Changing constant definitions should not cause tests to fail or the game to crash or misbehave when playing.
Make sure code is properly indented. Select-all + tab should not move anything is a good baseline.
2 Bonus
For a bonus, change the language to ISL and use list abstraction functions wherever appropriate. Do so successfully and we will replace a 0 quiz grade with a 1.