Class WalkingDoll

java.lang.Object
  extended by WalkingDoll

public class WalkingDoll
extends Object

Class that represents a walking doll

Author:
Mark Guzdial, Barb Ericson

Constructor Summary
WalkingDoll()
          We'll do the list setup in the constructor
 
Method Summary
 void draw()
          Draw the current character
 int getX()
          Method to get the x value of the position
 int getY()
          Method to get the y value of the position
static void main(String[] args)
          Main for testing
 void replay(int delay)
          Delegate replay
 void setLoc(int newX, int newY)
          Method to set the position to the new x and y
 void start()
          Start a walking sequence
 void step()
          Draw the next step
 void steps(int num)
          Draw a few steps
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WalkingDoll

public WalkingDoll()
We'll do the list setup in the constructor

Method Detail

getX

public int getX()
Method to get the x value of the position

Returns:
the x value of the position

getY

public int getY()
Method to get the y value of the position

Returns:
the y value of the position

setLoc

public void setLoc(int newX,
                   int newY)
Method to set the position to the new x and y

Parameters:
newX - the new x value to use
newY - the new y value to use

start

public void start()
Start a walking sequence


draw

public void draw()
Draw the current character


step

public void step()
Draw the next step


steps

public void steps(int num)
Draw a few steps


replay

public void replay(int delay)
Delegate replay


main

public static void main(String[] args)
Main for testing