public class Rook extends Piece { public Rook(Cell cell, Color color) { super(cell, color) ; } @Override public boolean isValidMove(Cell c) { return ( ( (this.getCell().getCol() == c.getCol()) || (this.getCell().getRow() == c.getRow()) ) && c.isEmpty() ) ; } }