first commit
This commit is contained in:
80
CS1322/p6/MyWay/CTile.java
Normal file
80
CS1322/p6/MyWay/CTile.java
Normal file
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* <PRE>
|
||||
* Tile.java
|
||||
*
|
||||
* Revisions: 1.0 Nov. 12, 2002
|
||||
* Created the Tile class
|
||||
*
|
||||
* </PRE>
|
||||
*
|
||||
* @author <A HREF="mailto:gtg184g@mail.gatech.edu">Jose Manuel Caban</A>
|
||||
* @version Version 1.0, Nov. 12, 2002
|
||||
*/
|
||||
|
||||
public class CTile extends CCoord{
|
||||
|
||||
/**
|
||||
*Defines whether the object is coming from the ground up to a given level
|
||||
*or whether it is a floating object (i.e. a bridge)
|
||||
*/
|
||||
private boolean bIsFloating;
|
||||
|
||||
/**
|
||||
*Define whether block has a special nibble
|
||||
*/
|
||||
private boolean bHasSpecial;
|
||||
|
||||
/**
|
||||
*Define whether block has a nibble
|
||||
*/
|
||||
private boolean bHasNibble;
|
||||
|
||||
////////////////
|
||||
//Constructors//
|
||||
////////////////
|
||||
|
||||
/**
|
||||
*@param x, the x-coord
|
||||
*@param y, the y-coord
|
||||
*@param h, the height
|
||||
*/
|
||||
public CTile(int x, int y, int h){
|
||||
this(x,y,h,false);
|
||||
}
|
||||
|
||||
/**
|
||||
*Same as other constructor but adds
|
||||
*@param bIsFloating, defines whether the object is floating or not
|
||||
*/
|
||||
public CTile(int x, int y, int h, boolean bFloating){
|
||||
super(x,y,h);
|
||||
bIsFloating = bFloating;
|
||||
}
|
||||
|
||||
///////////////////////
|
||||
//Accessors/Modifiers//
|
||||
///////////////////////
|
||||
|
||||
/**
|
||||
*@return true if object can be passed over
|
||||
*/
|
||||
public boolean isPassable(Coord op){
|
||||
if(op.getH() == this.h){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Debugging main for class Tile.
|
||||
* 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 Tile
|
||||
Reference in New Issue
Block a user