In this program, you'll use a loop to draw a simple ASCII-based
animation on the screen, and you will use modulus (%
) to
determine which frame of the animation to show. (You will learn how to
create your own loops later.)
(Do not re-type any of these files. Simply download a copy of each file by right-clicking and choosing "Save link as..." from the context menu. Save them into your normal code folder.)
If you download, compile and run ModulusAnimationWorm.java it will look roughly like this.
********
(It will look cooler while it's running.)
if
statements in
ModulusAnimation.java so that it draws a little animation of your choosing.
You must have a minimum of eight (8) different frames of animation, and it must
loop smoothly.
©2013–2015 Graham Mitchell
This assignment is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.