Exemple #1
0
 protected override void OnMove(int move)
 {
     if (Square.Rank(MovePackHelper.GetStartSquare(move)) == rankForEp && MovePackHelper.GetEndSquare(move) - MovePackHelper.GetStartSquare(move) == twoStep)
     {
         board.PlaceEnpassant(epSquare);
     }
     if ((move & MovePackHelper.EpFlag) != 0)
     {
         board.Capture(board.BoardArray[MovePackHelper.GetEndSquare(move) - oneStep]);
     }
 }
Exemple #2
0
 protected override void OnUnMove(int move)
 {
     //if (MovePackHelper.GetStartSquare(move)==epSquare && MovePackHelper.GetEndSquare(move)==epSquare+twoStep)
     if (Square.Rank(MovePackHelper.GetStartSquare(move)) == rankForEp && MovePackHelper.GetEndSquare(move) - MovePackHelper.GetStartSquare(move) == twoStep)
     {
         board.UnplaceEnPassant();
     }
     if ((move & MovePackHelper.EpFlag) != 0)
     {
         board.UnCapture(MovePackHelper.GetEndSquare(move) - oneStep);
     }
 }