Commit 754fbcf6 authored by 9611046's avatar 9611046

made the first sample of abstract class 'Piece'

parent 4e71cd06
package pieces;
/**
* Piece is an abstract class which means that it cannot be instantiated
*Rook, Knight, Queen, King and Pawn are subclasses of Piece
*/
public abstract class Piece {
private String pieceId;
private String pieceColor;
private String imagePath;
public void setImage(String image) {
imagePath = image;
}
public void setPieceColor(String pieceColor) {
this.pieceColor = pieceColor;
}
public void setPieceId(String pieceId) {
this.pieceId = pieceId;
}
public String getPieceColor() {
return pieceColor;
}
public String getPieceId() {
return pieceId;
}
public String getImage() {
return imagePath;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment