69 lines
1.4 KiB
Java
69 lines
1.4 KiB
Java
/**
|
|
* <PRE>
|
|
* CGhost.java
|
|
*
|
|
* Revisions: 1.0 Nov. 23, 2002
|
|
* Created the CGhost class
|
|
*
|
|
* </PRE>
|
|
*
|
|
* @author <A HREF="mailto:gtg184g@mail.gatech.edu">Jose Manuel Caban</A>
|
|
* @version Version 1.0, Nov. 23, 2002
|
|
*/
|
|
|
|
public class CGhost extends CMonster implements Constants{
|
|
|
|
private CCoord startLoc;
|
|
private CNode cLastNode;
|
|
private int iCurrDir;
|
|
private boolean bDazed;
|
|
|
|
public CGhost(CSprite image, CCoord startLoc){
|
|
oIntel = new CGhostAI();
|
|
imgSprite = image;
|
|
this.setParams(startLoc);
|
|
this.startLoc = startLoc;
|
|
}
|
|
|
|
public CGhost(CCoord startLoc){
|
|
this(new CSprite("Error",".gif",1),startLoc);
|
|
}
|
|
|
|
public int doMove(CCoord cPacPos){
|
|
return ((CGhostAI)oIntel).doMove(cLastNode,this,cPacPos);
|
|
}
|
|
|
|
public void setLastNode(CNode cLastNode){
|
|
this.cLastNode = cLastNode;
|
|
}
|
|
|
|
public void setDir(int dir){
|
|
iCurrDir = dir;
|
|
}
|
|
|
|
public int getDir(){
|
|
return iCurrDir;
|
|
}
|
|
|
|
public void setDaze(boolean b){
|
|
bDazed = b;
|
|
}
|
|
|
|
public boolean getDaze(){
|
|
return bDazed;
|
|
}
|
|
|
|
/**
|
|
* Debugging main for class CGhost.
|
|
* This method will rigorously test my code.
|
|
*
|
|
* <br><br>
|
|
* @param args a String array of command line arguments.
|
|
*/
|
|
public static void main(String[] args) {
|
|
|
|
|
|
}// end of main(String[] args)
|
|
|
|
}// end of class CGhost
|