public class Knight extends Piece { public Knight(Cell cell, Color color) { super(cell, color) ; } @Override public boolean isValidMove(Cell c, Cell board[][]) { return ( ( (Math.abs(this.getCell().getCol()-c.getCol()) + Math.abs(this.getCell().getRow() - c.getRow()) == 3) && (Math.abs(this.getCell().getCol()-c.getCol()) != 0 && Math.abs(this.getCell().getRow() - c.getRow()) != 0) ) && c.isEmpty() ) ; } }