6.8

Assignment 22

home work!

Programming Language ISL+

Due Date Mon 4/10 at 11:59pm

Possible Points 30

Purpose To use new design skills to solve complex problems.

Graded Exercises

Matt has a favorite game. That game is, of course, Typaholic! He has a game he loves almost as much, however: Flood-It. Because it’s his second favorite game, he was very excited to assign it as a homework.

When he brought this up at staff meeting, however, the tutors claimed it was "insane" to ask students to code a full-fledged game in half a week. "Can we at least give them the data definitions?" they asked. "Fine, we can give them the data definitions," Matt begrudgingly complied.

"Well, if we’re going to give them the data definitions, we may as well give them the main function," the tutors suggested. "Yes, ok, we’ll give them the main function," Matt yielded.

"Well, if we’re going to give them the main function, we may as well give them the less interesting big-bang handlers," the tutors proposed. "Fine, we’ll give them everything except on-tick," Matt said, on the verge of tears.

"Well, if we’re going to give them everything except on-tick, we may as well give them everything except the code of the most interesting helper function for on-tick," the tutors recommended. "Fine, we’ll give them everything except the code of the most interesting helper function for on-tick," Matt sobbed, heartbroken that students wouldn’t implement his second favorite game from scratch.

Exercise 1 Implement the flooding-flood function in this program (right click > save as...) so that it passes the given tests and adheres to the purpose statement.

Heads up:

Hints: