Jump to content

Find Chess960 starting position identifier: Difference between revisions

→‎{{header|Wren}}: Fix algorithm, add troublesome examples.
(→‎{{header|Ruby}}: Fix algorithm, add Unicode piece output and troublesome examples.)
(→‎{{header|Wren}}: Fix algorithm, add troublesome examples.)
Line 874:
var N = ntable[np]
 
var piecesQ = pieces.replace("NB", "")
var Q = piecesQ.indexOf("Q")
 
Line 887:
}
 
for (pieces in ["♕♘♖♗♗♘♔♖", "♖♘♗♕♔♗♘♖", "♜♛♞♝♝♚♜♞", "♜♞♛♝♝♚♜♞"]) {
System.print("%(pieces) or %(g2l.call(pieces)) has SP-ID of %(spid.call(pieces))")
}</lang>
Line 895:
♕♘♖♗♗♘♔♖ 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>
1,480

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.