docs: correct Task 4 test move data in the plan
The Task 4 test had East's and West's moves swapped relative to the PLAYER_BOARDS mapping (E plays NE/SE, W plays NW/SW). Caught and fixed in the shipped code during execution; this brings the plan document in line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -496,12 +496,12 @@ describe('legalSyncedMoves', () => {
|
||||
});
|
||||
|
||||
it('excludes a move legal on only one of the player\'s boards', () => {
|
||||
// N e2e4, S e2e4, E e7e5, W d7d5 -> NW black has pe5, NE black has pd5.
|
||||
// N e2e4, S e2e4, E d7d5, W e7e5 -> NW black has pe5 (W's), NE black has pd5 (E's).
|
||||
const g = new DuplicateGame([
|
||||
{ player: 'N', from: 'e2', to: 'e4' },
|
||||
{ player: 'S', from: 'e2', to: 'e4' },
|
||||
{ player: 'E', from: 'e7', to: 'e5' },
|
||||
{ player: 'W', from: 'd7', to: 'd5' },
|
||||
{ player: 'E', from: 'd7', to: 'd5' },
|
||||
{ player: 'W', from: 'e7', to: 'e5' },
|
||||
]);
|
||||
expect(g.currentPlayer).toBe('N');
|
||||
const keys = legalSyncedMoves(g).map((m) => `${m.from}${m.to}`);
|
||||
@@ -525,8 +525,8 @@ describe('selectionHighlight', () => {
|
||||
const g = new DuplicateGame([
|
||||
{ player: 'N', from: 'e2', to: 'e4' },
|
||||
{ player: 'S', from: 'e2', to: 'e4' },
|
||||
{ player: 'E', from: 'e7', to: 'e5' },
|
||||
{ player: 'W', from: 'd7', to: 'd5' },
|
||||
{ player: 'E', from: 'd7', to: 'd5' },
|
||||
{ player: 'W', from: 'e7', to: 'e5' },
|
||||
]);
|
||||
const h = selectionHighlight(g, 'e4'); // North's e4 pawn
|
||||
expect(h.boardA).toBe('NW');
|
||||
|
||||
Reference in New Issue
Block a user