Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
33
Task/Forest-fire/Locomotive-Basic/forest-fire-1.basic
Normal file
33
Task/Forest-fire/Locomotive-Basic/forest-fire-1.basic
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
10 randomize time:mode 1:ink 0,0:ink 1,9:ink 2,15:defint a-o,r-z
|
||||
20 pfire=0.00002:ptree=0.002
|
||||
30 dimx=90:dimy=90
|
||||
40 dim forest(dimx,dimy), forest2(dimx,dimy)
|
||||
50 for y=1 to dimy-1:for x=1 to dimx-1
|
||||
60 if rnd<.5 then forest(x,y)=1
|
||||
70 next:next
|
||||
80 gosub 1000
|
||||
100 for y=1 to dimy-1
|
||||
110 for x=1 to dimx-1
|
||||
120 on forest(x,y)+1 gosub 500,600,700
|
||||
130 next:next
|
||||
140 for y=1 to dimy-1
|
||||
150 for x=1 to dimx-1
|
||||
160 forest(x,y)=forest2(x,y)
|
||||
170 next:next
|
||||
180 gosub 1000
|
||||
190 goto 100
|
||||
500 if rnd<ptree then forest2(x,y)=1
|
||||
510 return
|
||||
600 if rnd<pfire then forest2(x,y)=2:return
|
||||
610 for yy=y-1 to y+1
|
||||
620 for xx=x-1 to x+1
|
||||
630 if forest(xx,yy)=2 then forest2(x,y)=2:return
|
||||
640 next:next:forest2(x,y)=1
|
||||
650 return
|
||||
700 forest2(x,y)=0
|
||||
710 return
|
||||
1000 for y=1 to dimy-1
|
||||
1010 for x=1 to dimx-1
|
||||
1020 plot 4*x,4*y,forest(x,y)
|
||||
1030 next:next
|
||||
1040 return
|
||||
2
Task/Forest-fire/Locomotive-Basic/forest-fire-2.basic
Normal file
2
Task/Forest-fire/Locomotive-Basic/forest-fire-2.basic
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
20 pfire=0.02:ptree=0.2
|
||||
30 dimx=9:dimy=9
|
||||
Loading…
Add table
Add a link
Reference in a new issue