Generate Chess960 starting position: Difference between revisions
Generate Chess960 starting position (view source)
Revision as of 02:16, 6 October 2021
, 2 years ago→{{header|Commodore BASIC}}
(→{{header|Commodore BASIC}}: Normalize input instead of erroring on >= 960; work without BEGIN/BEND) |
|||
Line 88:
120 OPEN 1,0:INPUT#1, SP$:CLOSE 1
130 SP=VAL(SP$)
140 IF SP<0 THEN SP=INT(RND(.)*960)
150 PRINT
160 DO WHILE SP>959: SP=SP-960: LOOP
|