Turn Coat game (TURNCOAT.BAS)
Turn Coat game
Description
Turn Coat game
From the Antic disk of August 1983 (Vol. 2 No. 5).
From the Antic Software Archive at atarimagazines.com. The program remains the property of its author and publisher.
What is in this file
Atari BASIC program · 1.1 KB
- Dialect
- Atari BASIC
- Lines
- 34
- Variables
A$,WAIT,CHBAS,UPPER,LOWER,L,J,I,K,NROWS,NCLMS,RN,CN,CLMS,R,ROW1,CLM1,ROW2,CLM2,CHN2,T
BASIC listing (34 lines)
199 REM * Initialize number of rows and columns
200 NROWS=8
205 NCLMS=12
210 GRAPHICS 2
219 REM * Draw random array of cells
220 FOR RN=1 TO NROWS:FOR CN=1 TO NCLMS
225 POSITION CN,RN
229 REM * Select cell type
230 R=INT(RND(0)*4)+1
235 ON R GOTO 240,250,260,270
240 PRINT #6;"O"
245 GOTO 275
250 PRINT #6;"o"
255 GOTO 275
260 PRINT #6;"O"
265 GOTO 275
270 PRINT #6;"o"
275 NEXT CN:NEXT RN
276 REM * End of initial array
284 REM * Select cell to remove
285 ROW1=INT(RND(0)*NROWS)+1:CLM1=INT(RND(0)*NCLMS)+1
294 REM * Select cell to duplicate
295 ROW2=INT(RND(0)*NROWS)+1:CLM2=INT(RND(0)*NCLMS)+1
304 REM * Check that cells are different
305 IF ROW1=ROW2 AND CLM1=CLM2 THEN GOTO 295
309 REM * Find contents of cell to duplicate
310 LOCATE CLM2,ROW2,CHN2
314 REM * Remove cell
315 POSITION CLM1,ROW1:PRINT #6;" "
320 FOR T=1 TO 150:NEXT T
324 REM * Replace cell
325 POSITION CLM1,ROW1:PRINT #6;CHR$(CHN2)
329 REM * Continue to remove and replace
330 GOTO 285
