Find Chess960 starting position identifier: Difference between revisions
Find Chess960 starting position identifier (view source)
Revision as of 20:06, 23 July 2022
, 1 year ago→{{header|Nim}}: Correct algorithm, add test examples.
(→{{header|Julia}}: Add troublesome examples.) |
(→{{header|Nim}}: Correct algorithm, add test examples.) |
||
Line 543:
let n = NTable[piecesN.positions(Knight)]
let piecesQ = pieces.filterIt(it !=
let q = piecesQ.find(Queen)
Line 558:
{{out}}
<pre>♕♘♖♗♗♘♔♖ or QNRBBNKR has SP-ID of 105
♖♘♗♕♔♗♘♖ or RNBQKBNR has SP-ID of 518
♖♕♘♗♗♔♖♘ or RQNBBKRN has SP-ID of 601
♖♘♕♗♗♔♖♘ or RNQBBKRN has SP-ID of 617</pre>
=={{header|Perl}}==
|