public BitBoard pawnAdvance(PieceColor mover) { BitBoard result = new BitBoard(this); if (mover.equals(PieceColor.WHITE)) { result.bits >>>= 8; } else { result.bits <<= 8; } return result; }
public BitBoard pawnCaptureWest(PieceColor mover) { BitBoard result = new BitBoard(this); if (mover.equals(PieceColor.WHITE)) { result.bits >>>= 9; } else { result.bits <<= 7; } return result.intersection(NO_FILE_H); }
public BitBoard negation() { BitBoard result = new BitBoard(); result.bits = ~this.bits; return result; }