A Russian roulette game for the Sinclair QL. Each turn the program picks a loaded chamber and a trigger pull at random, from 1 to 6. If they match it prints “BANG!” and “You are DEAD! YEA!” and asks whether to play again; otherwise it prints “Safe!… For now!”, waits four seconds and pulls again by itself. There is nothing to press until the gun goes off.
Ron S. Morr wrote the original in Pascal/VS on a Bell and Howell mainframe in 1984. David Johnson of Edison, Ohio converted it to SuperBASIC in 1986 with the author’s permission, as the REMark lines say. The play-again prompt only accepts a lower-case y or n, and each safe turn calls the next one from inside itself, so a long run of luck keeps nesting procedure calls. Both are as printed.
Published in Time Designs September/October 1986 (QL Kill).
Source Code
90 gun
100 REMark PROGRAM BY RON S. MORR 10/04/84: WRITTEN ON BELL AND HOWELL'S
110 REMark CHICAGO DATA CENTER MAIN FRAME USEING PASCAL/VS RELEASE 2.1
120 REMark CONVERTED TO SuperBASIC BY DAVID JOHNSON 09/07/86:CONVERTED
130 REMark WITH KIND PERMISSION FROM THE AUTHOR FOR THE Sinclair QL
135 WINDOW 512,256,0,0:CLS
140 DEFine PROCedure BANG
145 CURSOR 50,50,10,10
150 CSIZE 3,1:PRINT "BANG!"
151 death
155 END DEFine
170 DEFine PROCedure gun
172 LET chambers =RND (1 TO 6)
175 i=1:n=0:click=RND(1 TO 6)
180 IF click=chambers THEN BANG
181 IF click<>chambers THEN live
185 END DEFine
190 DEFine PROCedure live
195 CURSOR 50,30,10,10:CLS
200 CSIZE 3,1:PRINT"Safe!... For now! @!$%*&"
210 PAUSE 200:gun
220 END DEFine
230 DEFine PROCedure death
235 CLS:CURSOR 50,30,10,10
240 CSIZE 3,1:PRINT"You are DEAD! YEA!"
245 PRINT"PLAY AGAIN? (Y/N)"
250 INPUT a$:IF a$="y" THEN gun
255 IF a$="n" THEN STOP
260 END DEFine
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.