Generate Chess960 starting position: Difference between revisions

m
→‎{{header|REXX}}: used a variable for the LEAVE statement.
m (→‎generates 960 random positions: optimized the code for piece placement.)
m (→‎{{header|REXX}}: used a variable for the LEAVE statement.)
Line 719:
do forever; b2=random(1,8) /* c=color of bishop ►──────┘ */
if @.b2\==. | b2==b1 | b2//2==c then iterate /*bad position*/
leave _ /*found position for the 2 clergy*/
end /*forever*/ /* [↑] find a place: 1st bishop.*/
end /* _ */ /* [↑] " " " 2nd " */
Line 757:
do forever; b2=random(1,8) /* c=color of bishop ►──────┘ */
if @.b2\==. | b2==b1 | b2//2==c then iterate /*bad position*/
leave _ /*found position for the 2 clergy*/
end /*forever*/ /* [↑] find a place: 1st bishop.*/
end /* _ */ /* [↑] " " " 2nd " */