This repository has been archived on 2021-02-18. You can view files and clone it, but cannot push or open issues or pull requests.
chess/src/dev/kske/chess/piece/Piece.java

31 lines
635 B
Java
Raw Normal View History

package dev.kske.chess.piece;
/**
* Project: <strong>Chess</strong><br>
* File: <strong>Piece.java</strong><br>
* Created: <strong>01.07.2019</strong><br>
* Author: <strong>Kai S. K. Engelbart</strong>
*/
public abstract class Piece {
protected Color color;
public Piece(Color color) {
this.color = color;
}
public abstract boolean isValidMove(int xPos, int yPos, int xDest, int yDest);
public abstract Type getType();
public Color getColor() { return color; }
public static enum Type {
KING, QUEEN, ROOK, KNIGHT, BISHOP, PAWN;
}
public static enum Color {
WHITE, BLACK;
}
}