Anonymous user
Flipping bits game: Difference between revisions
m
→{{header|REXX}}: added a seed (for the RANDOM function) to make the game repeatable.
m (→{{header|REXX}}: elided a character from the REXX section header.) |
m (→{{header|REXX}}: added a seed (for the RANDOM function) to make the game repeatable.) |
||
Line 3,478:
<br>program simpler). A fair amount of coding was added to check for a legal "move".
<lang rexx>/*REXX program presents a "flipping bit" puzzle. The user can solve via it via C.L. */
parse arg N u seed .
if N=='' | N=="," then N=3
if u=='' | u=="," then u=N
if datatype(seed, 'W') then call random ,,seed /*is there a seed (for repeatability?) */
col@= 'a b c d e f g h i j k l m n o p q r s t u v w x y z' /*literal for column id.*/
cols=space(col@, 0); upper cols /*letters to be used for the columns. */
|