예제 #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;
 }
예제 #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);
 }
예제 #3
0
 public BitBoard negation() {
   BitBoard result = new BitBoard();
   result.bits = ~this.bits;
   return result;
 }