[SOLVED] Ready to Program Java IDE Problem #3 PacMan For Loop to Slide Across the Scr
Here is my assignment:
Modify your pacman program. Complete the methods to draw a closed mouth. Use a for loop to slide pacman across the screen.
Here is what I have done:
// The "PacManModified" class.
public class PacManModified
static Console c; // The output console
public static void main (String args)
c = new Console ();
for (int i=0; i< 10; i++)
} // main method
public static void closedMouth (int x, int y, int RADIUS)
c.fillOval (x + 20, y + 8 , 30, 35);
public static void openMouth (int x, int y, int RADIUS)
c.fillArc (x, y, RADIUS, RADIUS, 30, 300);
c.fillOval (x + 20, y + 10, 8, 8);
public static void move ()
} // PacManModified class
I believe I have completed the method to draw the closed mouth. However, I do not understand how to use a for loop to slide PacMan across the screen.