| Due date: 4/13 @ 4:30 pm
For this project, we do not allow collaboration between teams. You may
only work with your partner and nobody else. We will use tools that
discover non-obvious plagiarism to test for violations of this policy.
also,
If you took this course previously, you may do the same project.
Doing so will result in a zero on this project.
This final problem set concerns the use of design skills in the context
of problems that come without clear statements. Instead someone may say
"we need a game program" or "we need a simulator for a harbor" or "we
need an accounting application for an after-school program", and then it
is your job to translate this statement into a prototype that "customers"
can nix, enhance, or accept.
The total score of this problem set is 200 points (see below). It thus
corresponds to approximately three to four regular problem sets. This
gives you a chance to make up "prior losses", but due to our grading
policy you are not required to do so, if you have strong homework scores
for the first 10 problem sets.
Choose one of the following three projects. If you're unsure, conduct
some preliminary experiments via exploratory programming and discuss the
results. If you do not like the following three problem suggestions, you
are welcome to propose your own "story" to the instructor. If he
approves the project, you may earn up to 250
points instead of just 200 points.
The problem set has two deadlines:
- April 7: On this day you must see
the instructor or TA to get approval for your preliminary design. The
preliminary design consists of: data definitions, a function wish list
for each data definition (purpose/contract for each function), and
ideally test cases for the functions on your wish list.
- April 13: On this day you must send in your
homework to the instructor as a Scheme attachment and drop off a
paper copy. The paper copy must include the signed draft. We will
discount solutions without a signed preliminary draft at 50%.
Simple Tetris:
Develop a simple Tetris-style program. A Tetris world consists of a world
of blocks. Some blocks (or none) are lying on the ground; one block is
descending toward the ground. The player can direct this descending block
with the left and right arrow keys. Hitting the left arrow key moves the
block to the left by one block width; hitting the right arrow key moves it
in the other direction. Once the block has landed on the ground or another
block, a new block appears at the top at some random position. The goal of
the game is to land as many blocks as possible before one column of blocks
hits the top of the canvas (or touches some other horizontal line across
the canvas).
Worm:
Develop a simple worm game. The Worm world consists of a piece of food and
a multi-segment worm. In the beginning, the worm has only a head segment
and it rests in the middle. The player can move the worm with the four
arrow keys, and the worm corresponds with appropriate movements. Once the
worm moves in some direction, it keeps moving. If it runs into any of the
four walls of the canvas, the game is over.
The worm can, and is supposed to, eat the food. Eating a piece of food
grows the worm by one segment. Then a new piece of food appears at some
random spot on the canvas. As the worm grows, a new danger appears: the
worm can now run into itself. If the worm does run into itself, the game
is also over.
The goal of the game is for the worm to eat as many pieces of food. A
player's score is the number of segments of a worm at the end of a game.
The "Star Thaler" Problem:
Star Money, Star Thalers
by the Grimm Brothers
There was once upon a time a little girl whose father and mother were dead,
and she was so poor that she no longer had a room to live in, or bed to
sleep in, and at last she had nothing else but the clothes she was wearing
and a little bit of bread in her hand which some charitable soul had given
her. She was good and pious, however. And as she was thus forsaken by all
the world, she went forth into the open country, trusting in the good God.
Then a poor man met her, who said, ``Ah, give me something to eat, I am so
hungry.''
She handed him the whole of her piece of bread, and said, ``May God bless
you,'' and went onwards.
Then came a child who moaned and said, ``My head is so cold, give me
something to cover it with.''
So she took off her hood and gave it to him. And when she had walked a
little farther, she met another child who had no jacket and was frozen with
cold. Then she gave it her own, and a little farther on one begged for a
frock, and she gave away that also.
At length she got into a forest and it had already become dark, and there
came yet another child, and asked for a shirt, and the good little girl
thought to herself, ``It is a dark night and no one sees you, you can very
well give your shirt away,'' and took it off, and gave away that also.
And as she so stood, and had not one single thing left, suddenly some stars
from heaven fell down, and they were nothing else but hard smooth pieces of
money, and although she had just given her shirt away, she had a new one
which was of the very finest linen. Then she put the money into it, and was
rich all the days of her life.
Develop a game program based on the story of ``Star Money, Star Thalers.''
The main function of the program should consume a natural number
and drop that many thalers (from the top of the world) on the girl (at the
bottom of the world), one at a time. The thaler should move
randomly to the left or right and downwards, but should always stay within
the boundaries of the world (canvas). The girl should react to
'left and 'right keystrokes, moving a moderate
number of pixels in reaction but always staying completely within the
boundaries of the world.
Optional: Please explain any problems you had completing this assignment in no more than 30 words. |