The user controls an image (U) on the left edge of the screen, that
can be moved up and down. Images are created on the right edge of the
screen, and these scroll toward the user's image on the left edge.
There are some images that the user tries to get (G), and there are
other images that the user tries to avoid (A). The user earns a
score, shown next to the title of the game, and the game ends when
some condition is reached.
And the rest is up to you!
You get to choose the game's theme/story, by choosing the title,
images, distribution of images, game speed, scoring function, and
game-over condition. And, of course, you can do more if you like, as
long as your game still fits the description given above. (Be sure to
choose a theme for your game that is appropriate for a general
audience!)
Small prizes and great honor will be bestowed upon the authors of
the games we like best.
Start thinking now about ideas for the game you'll be creating.
Whatever theme you choose, you must at least choose something. If
your game is as lame as the one in the screenshot shown above, you
will not receive full credit.
You may find this assignment to be fairly challenging in places.
Make sure you leave yourself enough time to make your game
interesting, as well as functional.Game g = new Game(); g.populateRightEdge();
then after calling scrollLeft, it should appear as follows:
Note that the G that was in the leftmost column has disappeared, and
that an A has moved into the leftmost column. Note that the rightmost
column will always be empty after scrollLeft is called.
Finally, note that the user-controlled U should remain exactly where
it was. (For now, you should assume that there is no image
immediately to the right of the user, so you will not need to worry
about the possibility of a collision in this exercise.)
Hint: You might find it easier to first write a helper method
that simply scrolls everything in a given row.
Be sure to test your code by running the game.