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

102
CS1322/p6/GamePiece.java Normal file
View File

@@ -0,0 +1,102 @@
/**
* <PRE>
* GamePiece.java
*
* Revisions: 1.0 Nov. 11, 2002
* Created the GamePiece 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 abstract class GamePiece {
/////////////////////////////////////////////////////
//coordinates such that (0,0) is the top left pixel//
/////////////////////////////////////////////////////
/**
*The X-Pos
*/
protected int x;
/**
*The Y-Pos
*/
protected int y;
///////////////
//Constructor//
///////////////
/**
*Default Constructor for GamePiece
*@param x, the x coordinate
*@param y, the y coordinate
*/
public GamePiece(int x, int y){
this.x = x;
this.y = y;
}
/////////////
//Accessors//
/////////////
/**
*@return the X-Corrdinate
*/
public int getX(){
return x;
}
/**
*@return the Y-Coordinate
*/
public int getY(){
return y;
}
///////////
//Methods//
///////////
/**
*@param x, the x value of the piece
*@param y, the y value of the piece
*/
public void setPosition(int x, int y){
this.x = x;
this.y = y;
}
public String toString(){
return ("[X: " +x+ "Y: " +y+ "]");
}
/***********************************************************/
/**
* Debugging main for class GamePiece.
* 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 GamePiece