record the pawn that was taken en passant

This commit is contained in:
Jesse D. McDonald 2020-03-15 12:57:49 -05:00
parent 2248ff2794
commit fad973b1bc
1 changed files with 1 additions and 0 deletions

View File

@ -319,6 +319,7 @@ function movePiece(priorBoard, side, from, to){
if (move.side[0] === other[0] && moveFrom[1] != to[1]) { if (move.side[0] === other[0] && moveFrom[1] != to[1]) {
board.move.en_passant = true; board.move.en_passant = true;
alongside = 'p'; alongside = 'p';
board.move.took = 'p';
boardPut(board, move.to, other, ' '); boardPut(board, move.to, other, ' ');
replacedFrom = move.to; replacedFrom = move.to;
replaced = boardGet(board, replacedFrom, side); replaced = boardGet(board, replacedFrom, side);