Commit 38e3d138 authored by lub's avatar lub

Edited RENDU file

parent 2d2cfd89
......@@ -2,4 +2,8 @@ Extensions non demandées :
- Black - White turn check.
- Move's history.
- En passant move in pawn move.
- Castling move in king move. Perform by move the king 2 square along rank
\ No newline at end of file
- Castling move in king move. Perform by move the king 2 square along rank.
- Promotion move in pawn move. Perform by command "([a-h]|[A-H])([7|2])-([a-h]|[A-H])([8|1])-([q|Q|b|B|k|K|r|R])".
Q|q for queen, B|b for bishop, K|k for knight, R|r for rook.
If you run a normal move's command, or a promotion command with not-listed character, it will keep staying as a pawn.
If you run a promotion move's command for another piece, it will work the same as normal move's command.
\ No newline at end of file
......@@ -179,12 +179,13 @@ describe("Test blackPawnMove()", () => {
putPiece(chessboard, positionE5, pieces.blackPawn);
let transform : Move = {from: positionE2, to: positionE1, isValid: true, trans: "Q"};
let transform2 : Move = {from: positionE2, to: positionE1, isValid: true, trans: "z"};
let noTransform: Move = {from: positionE5, to: positionE6, isValid: true, trans: "Q"};
expect(isPossible.blackPawnMove(chessboard, transform)).toBeTruthy();
expect(isPossible.blackPawnMove(chessboard, noTransform)).toBeFalsy();
performMove(chessboard, transform);
expect(squareAtPosition(chessboard, positionE1).piece).toBe(pieces.blackQueen);
performMove(chessboard, transform2);
expect(squareAtPosition(chessboard, positionE1).piece).toBe(pieces.blackPawn);
})
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment