Commit e1dadb2a authored by Maxime PERRIN's avatar Maxime PERRIN
Browse files

test roi peut manger

parent 11941203
......@@ -257,7 +257,7 @@ describe("Test kingMove()", () => {
expect(isPossible.kingMove(chessboard, impossibleMoveToG6)).toBeFalsy();
})
it("A King cannot capure pieces from the same color", () => {
it("A King cannot capture pieces from the same color", () => {
putPiece(chessboard, positionE5, pieces.blackPawn); // Black Pawn at E5
// Check the King cannot move to E5.
......@@ -266,8 +266,11 @@ describe("Test kingMove()", () => {
})
it("A King can capure pieces from a different color", () => {
// Place a white Pawn on E5
putPiece(chessboard, positionE5, pieces.whitePawn); // white Pawn at E5
// Check the King can move to E5.
let canCapture: Move = {from: positionE4, to: positionE5, isValid: true}
expect(isPossible.kingMove(chessboard, canCapture)).toBeTruthy();
})
});
......
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