first commit
This commit is contained in:
106
CS1322/p6/FloorPiece.java
Normal file
106
CS1322/p6/FloorPiece.java
Normal file
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* <PRE>
|
||||
* FloorPiece.java
|
||||
*
|
||||
* Revisions: 1.0 Nov. 11, 2002
|
||||
* Created the FloorPiece class
|
||||
* 1.1 Nov. 11, 2002
|
||||
* Compiled, Commented, Finished
|
||||
*
|
||||
* </PRE>
|
||||
*
|
||||
* Collaboration Statement:
|
||||
* I worked on the homework assignment alone, using only
|
||||
* course materials.
|
||||
*
|
||||
* Created with JCreatorLE, some indents are off when viewed through notepad
|
||||
* or EMACS
|
||||
*
|
||||
* @author <A HREF="mailto:gtg184g@mail.gatech.edu">Jose Manuel Caban</A>
|
||||
* @version Version 1.1, Nov. 11, 2002
|
||||
*/
|
||||
|
||||
public class FloorPiece extends GamePiece{
|
||||
|
||||
/**
|
||||
*Defines whether or not the piece has a little yellow ball for Pacman
|
||||
*/
|
||||
private boolean bHasNibble;
|
||||
|
||||
/**
|
||||
*Defines whether or not the piece has a ghost nibble thing
|
||||
*/
|
||||
private boolean bHasSpecial;
|
||||
|
||||
///////////////
|
||||
//Constructor//
|
||||
///////////////
|
||||
|
||||
/**
|
||||
*Constructor
|
||||
*@param x, the x coordinate
|
||||
*@param y, the y coordinate
|
||||
*@param bHasNibble, nibble on space or not
|
||||
*@param bHasSpecial, has Special nibble or not
|
||||
*/
|
||||
public FloorPiece(int x, int y, boolean bHasNibble, boolean bHasSpecial){
|
||||
super(x,y);
|
||||
this.bHasNibble = bHasNibble;
|
||||
this.bHasSpecial = bHasSpecial;
|
||||
}
|
||||
|
||||
///////////////////////
|
||||
//Accessors/Modifiers//
|
||||
///////////////////////
|
||||
|
||||
/**
|
||||
*Modifier for bHasNibble
|
||||
*@param bHasNibble, the value to be placeds in bHasNibble
|
||||
*/
|
||||
public void setNibble(boolean bHasNibble){
|
||||
this.bHasNibble = bHasNibble;
|
||||
}
|
||||
|
||||
/**
|
||||
*Accessor for bHasNibble
|
||||
*@return the value of bHasNibble
|
||||
*/
|
||||
public boolean getNibble(){
|
||||
return bHasNibble;
|
||||
}
|
||||
|
||||
/**
|
||||
*Modifier for bHasSpecial
|
||||
*@param bHasSpecial the new value for bHasSpecial
|
||||
*/
|
||||
public void setSpecial(boolean bHasSpecial){
|
||||
this.bHasSpecial = bHasSpecial;
|
||||
}
|
||||
|
||||
/**
|
||||
*Accessor for bHasSpecial
|
||||
*@return the value of bHasSpecial
|
||||
*/
|
||||
public boolean getSpecial(){
|
||||
return bHasSpecial;
|
||||
}
|
||||
|
||||
public String toString(){
|
||||
return (super.toString() + "Floor Piece]");
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
/**
|
||||
* Debugging main for class FloorPiece.
|
||||
* 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 FloorPiece
|
||||
Reference in New Issue
Block a user