Two bullet roulette: Difference between revisions

m
→‎{{header|REXX}}: simplified the code, add some wording to the REXX section header.
(→‎{{header|REXX}}: added the computer programming language REXX.)
m (→‎{{header|REXX}}: simplified the code, add some wording to the REXX section header.)
Line 803:
=={{header|REXX}}==
{{trans|GO}}
 
This REXX version eliminates the spinning of the bullet chamber if the random number for a spin is   '''6'''   (which would
<br>normally just spin the bullet chamber around to its initial position, &nbsp; thereby saving some busywork by the program).
<lang rexx>/*REXX pgm simulates scenarios for a two─bullet Russian roulette game with a 6 cyl. gun.*/
parse arg cyls tests seed . /*obtain optional arguments from the CL*/
Line 835 ⟶ 838:
if act=='S' then $= $", spin"
if act=='F' then $= $", fire"
end /*j*/; return right( strip( strip($, , ",") ), 50)</lang>
{{out|output|text=&nbsp; when using the default inputs:}}
output