The issue at hand are the board visualization and default positions of the white and black queen in queen-attack, at least in the typescript implementation.
When a chess board is printed, it is generally done so from
white’s perspective: with white at the bottom of the board,
and black at the top. The bottom-left square in chess notation is a1.
When using 0-indexed arrays, as this practice exercise does, one
would naturally think that [0,0] might correspond to square a1.
Instead, prior to this change, the tests specified that the first square
printed was [0,0], which would make [0,0] equivalent to a8.
If a solution did treat [0,0] as a1, then they would run into problems
at the board visualization stage.
In this PR, we add tests that explicitly clarify the white and black
queen’s starting positions such that they correspond with an orientation
of [0,0] being equivalent to square a1. We also update the board
visualization tests accordingly.
I believe this issue mainly falls under the
The "Some languages implement tests beyond this set, such as checking", "for two pieces being placed on the same position, representing", "the board graphically, or using standard chess notation. Those", "tests can be offered as extra credit"
of the specs repository, which I just learned about.
This being my first contribution, I didn’t know the general procedure,
and so I opened a PR for this here in case anyone would like to review it.