Exemple #1
0
 public BitBoard pawnAdvance(PieceColor mover) {
   BitBoard result = new BitBoard(this);
   if (mover.equals(PieceColor.WHITE)) {
     result.bits >>>= 8;
   } else {
     result.bits <<= 8;
   }
   return result;
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 public BitBoard negation() {
   BitBoard result = new BitBoard();
   result.bits = ~this.bits;
   return result;
 }