/** *
* MoveablePiece.java * * Revisions: 1.0 Nov. 11, 2002 * Created the MoveablePiece class * 1.1 Nov. 11, 2002 * Compiled, Finished, Done * ** * 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 Jose Manuel Caban * @version Version 1.1, Nov. 11, 2002 */ public abstract class MoveablePiece extends GamePiece implements P6Constants{ //////////////// //Constructors// //////////////// /** *Constructor *@param x, the x coordinate *@param y, the y coordinate */ public MoveablePiece(int x, int y){ super(x,y); } /////////// //Methods// /////////// /** *Move the piece in a direction *@param direction to be moved */ public void move(int direction){ switch(direction){ case NORTH: //if(y==0){} //else{ y--; //} break; case EAST: //if(x==max){} //else{ x++; //} break; case SOUTH: //if(y==max){} //else{ y++; //} break; case WEST: //if(x==0){} //else{ x--; //} break; default: System.err.println("How the heck did you do this"); break; } } /*************************************************************/ /** * Debugging main for class MoveablePiece. * This method will rigorously test my code. * *