From 3222b53d942daa404852e5148ba9d3ebb8fe96d0 Mon Sep 17 00:00:00 2001 From: dickmao Date: Mon, 27 Aug 2018 17:00:35 -0400 Subject: Pre-moves To activate, look for Chess Display Allow Pre Moves in: M-x customize-group chess-display Tested via: make test make test24 (requires evim) --- features/premove.feature | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 features/premove.feature (limited to 'features/premove.feature') diff --git a/features/premove.feature b/features/premove.feature new file mode 100644 index 0000000..47cf85f --- /dev/null +++ b/features/premove.feature @@ -0,0 +1,34 @@ +Scenario: en-passant logic assumed no pre-moves (white) + Given I start server and client + Then I am ready to play + When white moves "d4" + And white selects "d4" + Then the square at "d3" is unhighlighted + +Scenario: en-passant logic assumed no pre-moves (black) + Given I start server and client + Then I am ready to play + When white moves "d4" + And black moves "e5" + And black selects "e5" + Then the square at "e6" is unhighlighted + +Scenario: pre-move can leave king in check, assuming checking piece is captured + Given I start server and client + Then I am ready to play + And I set position of "*chess-network*<1>" to fen "3rk3/8/8/3R4/8/8/PPPPPPPP/1NBQKBNR w - -" + And I send position from "*chess-network*<1>" + When black selects "e8" + And black selects "d8" + Then the square at "d8" is highlighted pre-move + + +Scenario: pre-move promotion should not ask yet + Given I start server and client + Then I am ready to play + And I set position of "*chess-network*<1>" to fen "rnbqkbn1/pppppppP/8/8/8/8/PPPPPPP1/RNBQKBNR w - -" + And I send position from "*chess-network*<1>" + And white moves "d4" + And white selects "h7" + And white selects "h8" + Then the square at "h8" is highlighted pre-move -- cgit v1.2.3