first commit

This commit is contained in:
Jose Caban
2025-06-07 01:59:34 -04:00
commit 388ac241f0
3558 changed files with 9116289 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
/**
* <PRE>
* MoveablePiece.java
*
* Revisions: 1.0 Nov. 11, 2002
* Created the MoveablePiece class
* 1.1 Nov. 11, 2002
* Compiled, Finished, Done
*
* </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 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.
*
* <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 MoveablePiece