package de.vivi.chess.pieces; import de.vivi.chess.board.Board; import de.vivi.chess.board.Field; public abstract class Piece { private final Color color; private final Type type; protected char symbol; protected Piece(Color color, Type type) { this.color = color; this.type = type; symbol = '\u0000'; } /** * TODO: implement *

* This method needs to be implemented in each piece by * using inheritance. It returns true if the move from the * from field to the to field is considered a valid move * for the type of piece this method is called on. Otherwise * it returns false. */ public abstract boolean isValidMove(Board board, Field from, Field to); public Color getColor() { // TODO: implement return color; } public Type getType() { // TODO: implement return type; } /** * TODO: implement *

* Use unicode symbols for the chess pieces. You can find * them here: * Unicode chess pieces */ public char getSymbol() { return symbol; } }