A C D E G I M O P R S T

A

add(AnyType) - Method in class MyList
Inserts a value at the end of the list.
add(AnyType) - Method in interface SimpleList
Inserts an element at the end of the list.
allGone() - Method in class Pellets
Determine whether all of the pellets have been consumed.

C

canMove(Point) - Method in class MunchGame
Determine whether the given point is free (so that a caterpillar can move onto it).
Caterpillar - Class in <Unnamed>
Caterpillars, for use in the Munch Game
Caterpillar(Color, Point, int, int) - Constructor for class Caterpillar
Construct a new caterpillar with the given color and starting position.

D

dequeue() - Method in class MyList
Retrieves and removes the first element of the queue
dequeue() - Method in interface SimpleQueue
Retrieves and removes the first element of the queue

E

enqueue(AnyType) - Method in class MyList
Inserts a value at the end of the queue
enqueue(AnyType) - Method in interface SimpleQueue
Inserts an element at the end of the queue

G

getScore() - Method in class Caterpillar
Get the caterpillar's score.

I

isEmpty() - Method in class MyList
Determine whether the list is empty.
isEmpty() - Method in interface SimpleList
Determines whether the list is empty.
isEmpty() - Method in interface SimpleQueue
Determines if the queue has no elements
iterator() - Method in class MyList
Returns an Iterator object that iterates over the elements in this list in proper sequence.

M

main(String[]) - Static method in class MunchGame
The main method.
main(String[]) - Static method in class MyList
 
move(MunchGame) - Method in class Caterpillar
Move the caterpillar one step.
movePlayers() - Method in class MunchGame
For each player, consume the next command and move accordingly.
MunchGame - Class in <Unnamed>
The user interface and main program for the munch game.
MunchGame() - Constructor for class MunchGame
Construct a new instance of the caterpillar game.
MyList<AnyType> - Class in <Unnamed>
A generic linked list class that you will write so that it implements the SimpleList and SimpleQueue interfaces.
MyList() - Constructor for class MyList
 

O

onPosition(Point) - Method in class Caterpillar
Determine whether any part of the caterpillar's body lies on the given position.
onPosition(Point) - Method in class Pellets
Determine whether a pellet lies on the given position.

P

paint(Graphics) - Method in class Caterpillar
Draw this caterpillar on the given graphics pane and draw its score in the appropriate location.
paint(Graphics) - Method in class MunchGame
Draw the current game state, or display splash screen with winner if done.
paint(Graphics) - Method in class Pellets
Draw the pellets on the given pane
peek() - Method in class MyList
Retrieves, but does not rempve, the first element of the queue
peek() - Method in interface SimpleQueue
Retrieves, but does not remove, the first element of the queue
Pellets - Class in <Unnamed>
Pellets, to be eaten by Caterpillars in the Munch Game.
Pellets(Color, int) - Constructor for class Pellets
Create the new pellets, with the given color at randomly chosen positions.

R

remove(AnyType) - Method in class MyList
Removes the first element of the list that is equal to value
remove(Point) - Method in class Pellets
Remove the pellet at Point p from the collection of pellets.
remove(AnyType) - Method in interface SimpleList
Removes the first element of the list that equals value.
run() - Method in class MunchGame
Run the game and animate the results.

S

setDirection(char) - Method in class Caterpillar
Set the direction of the head of the caterpillar.
SimpleList<AnyType> - Interface in <Unnamed>
An interface for simple lists that includes an Iterator.
SimpleQueue<AnyType> - Interface in <Unnamed>
An interface for queues that includes an Iterator.

T

toString() - Method in class MyList
Returns a string representation of this linked list

A C D E G I M O P R S T