uwcse.sim
Class Man

java.lang.Object
  |
  +--uwcse.sim.PacThing
        |
        +--uwcse.sim.MovingThing
              |
              +--uwcse.sim.Man
All Implemented Interfaces:
Thing

class Man
extends MovingThing

The pac man goes around, eating food. It is controlled by a controller that turns keystrokes into directions of travel.


Field Summary
(package private)  boolean mouthOpen
           
 
Fields inherited from class uwcse.sim.MovingThing
direction
 
Fields inherited from class uwcse.sim.PacThing
alive, rand, world, x, y
 
Constructor Summary
Man(WorldModel wm, int x, int y)
           
 
Method Summary
 void displayOn(uwcse.graphics.GWindow g)
          Displays as an oval, with its mouth open or closed.
 void interact(PacThing t)
          Kills food.
 
Methods inherited from class uwcse.sim.MovingThing
, action
 
Methods inherited from class uwcse.sim.PacThing
checkNeighbors, getX, getY, isAlive, kill, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mouthOpen

boolean mouthOpen
Constructor Detail

Man

public Man(WorldModel wm,
           int x,
           int y)
Method Detail

displayOn

public void displayOn(uwcse.graphics.GWindow g)
Displays as an oval, with its mouth open or closed.
Overrides:
displayOn in class MovingThing

interact

public void interact(PacThing t)
Kills food.
Overrides:
interact in class MovingThing