Homework 10
Due Date: Sunday, April 9, 10pm
Purpose
This problem set has two main goals: first, to practice the use of existing abstractions; second, to learn how to edit programs that you have already written, an essential skill for any programmer.
First, edit your Tetris project once again. Be sure to fix any and all problems that your graders have (or would have) discovered.
Since you have a new partner, note that you can now work from two independent code bases: the code you wrote and the code your new partner wrote. Read them both over, take the good ideas and drop the bad ones.
Next, you are to use local and "loops" (functional abstractions such as map, foldr, filter, etc.) wherever your functions may benefit from them, especially for the lists of objects in your project. You may also use lambda terms in place of locally-named helper functions, if you wish.
You should notice that the length of your program decreases considerably.
Finally, give your program the missing feature that will make it a full Tetris game: whenever some row of the board is completely full of blocks, it should be deleted, and everything above shifted down one row.
Note: you should remove templates from your code before you hand it in. (Templates are handy for developing code, but do not need to appear in the final program, and they will not be of use when you are using functional abstractions.)