Jump to content

Forest fire: Difference between revisions

m
small fix to Applesoft BASIC as it was missing POKE I,B ; and added Commodore BASIC as it is pretty much the same code
m (→‎{{header|Wren}}: Changed to Wren S/H)
m (small fix to Applesoft BASIC as it was missing POKE I,B ; and added Commodore BASIC as it is pretty much the same code)
Line 1,134:
<syntaxhighlight lang="gwbasic"> 100 FOR I = 17239 TO 17493
110 READ B
120 NEXT POKE I,B
130 CALL 17239NEXT
140 ENDCALL 17239
150 END
150 DATA 162,23,138,32,71,248,165,38,157,60,3,165,39,157,84,3,202,16,239,162,96
160 DATA 134DATA162,24923,134138,132,16071,0248,132165,038,152157,14560,03,200165,20839,251157,23284,1343,1202,22416,128239,208162,96
170 DATA 244DATA134,44249,86134,1921,44160,820,192132,440,84152,192145,440,80200,192208,32251,50232,248134,1621,0224,134,0128,169208
180 DATA 41DATA244,13344,286,133192,25444,16982,83192,13344,484,165192,24944,13380,1192,13332,350,133248,5162,730,16134,1330,255169
190 DATA DATA41,133,2492,138133,134254,45169,7483,168133,1694,15165,144249,2133,105,2241,133,463,185133,605,373,16,133,38255
200 DATA 185DATA133,84249,3138,133134,3945,16074,1168,132169,4415,177144,2,145105,254224,240133,7946,16185,9360,1693,0,164133,4438
210 DATA 145DATA185,25484,1363,81133,3839,37160,461,81132,3844,145177,382,164145,44254,200240,19279,4116,20893,224169,1650,2164,44
220 DATA 133DATA145,0254,165136,381,13338,137,16546,481,13338,2145,13338,254164,2444,105200,42192,13341,4208,224,165,5,73,162
230 DATA 133DATA133,2550,73165,163,133,31,105165,04,133,52,166133,45254,23224,224105,4842,208133,1594,44165,05,19273,16
240 DATA 48DATA133,3255,7673,14416,67133,443,16105,1920,44133,815,192166,9645,198232,8224,48,208,190159,16944,1010,133,8,169192
250 DATA 68DATA48,2083,16976,169144,15367,20844,16516,198192,644,20881,192,1496,198,78,208,10190,169,23101,133,68,169
260 DATA 39,133,7DATA68,208,234169,177169,0153,17208,4165,136198,176,0208,1714,2198,177,4208,20010,200169,1723,0,17,2133,176,4169
270 DATA39,133,7,208,234,177,0,17,4,136,17,0,17,2,17,4,200,200,17,0,17,2,17,4
270280 DATA 48DATA48,213,16,137,41</syntaxhighlight>
 
==={{header|BASIC256}}===
Line 1,234 ⟶ 1,235:
[[File:Forestbbc.gif|200px]]
 
==={{header|Commodore BASIC}}===
{{trans|6502 Assembly}}
With the keyword CALL changed to SYS, the [[Random_numbers#Applesoft_BASIC|Applesoft BASIC]] code works in Commodore BASIC.
<syntaxhighlight lang="gwbasic"> 100 FOR I = 17239 TO 17493
110 READ B
120 POKE I,B
130 NEXT
140 SYS 17239
150 END
150160 DATA 162DATA162,23,138,32,71,248,165,38,157,60,3,165,39,157,84,3,202,16,239,162,96
170 DATA134,249,134,1,160,0,132,0,152,145,0,200,208,251,232,134,1,224,128,208
180 DATA244,44,86,192,44,82,192,44,84,192,44,80,192,32,50,248,162,0,134,0,169
190 DATA41,133,2,133,254,169,83,133,4,165,249,133,1,133,3,133,5,73,16,133,255
200 DATA133,249,138,134,45,74,168,169,15,144,2,105,224,133,46,185,60,3,133,38
210 DATA185,84,3,133,39,160,1,132,44,177,2,145,254,240,79,16,93,169,0,164,44
220 DATA145,254,136,81,38,37,46,81,38,145,38,164,44,200,192,41,208,224,165,2
230 DATA133,0,165,3,133,1,165,4,133,2,133,254,24,105,42,133,4,165,5,73,16
240 DATA133,255,73,16,133,3,105,0,133,5,166,45,232,224,48,208,159,44,0,192
250 DATA48,3,76,144,67,44,16,192,44,81,192,96,198,8,208,190,169,101,133,8,169
260 DATA68,208,169,169,153,208,165,198,6,208,14,198,7,208,10,169,23,133,6,169
270 DATA39,133,7,208,234,177,0,17,4,136,17,0,17,2,17,4,200,200,17,0,17,2,17,4
280 DATA48,213,16,137,41</syntaxhighlight>
==={{header|FreeBASIC}}===
<syntaxhighlight lang="freebasic">'[RC] Forest Fire
413

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.