N3bula404
Badges: 2
Rep:
?
#1
Report Thread starter 1 year ago
#1
i was modifying and practising with the alevel seedlands program but ran into a problem. the major problem i am having is that the
for Row in range(FIELDLENGTH):
for Column in range(FIELDWIDTH):
means that the code senses each piece of soil from the top left to bottom right, so in subroutines like the SNOWSTORM one that moves the seeds in a random direction (north/northest/east/southeast/south/west/northwest), if the seeds get moved into a place where the code senses it again, it keeps moving until it shifts out of the field.

again, the same thing happens with the grass generation (the grass spawns way to fast as the newly spawned east and south tufts are sensed over and over spamming it in that direction.

i want to implement fire, but i'm afraid that it'll just destroy all the plants in the south and east directions from where-ever it is spawned.

i have tried to make 2 fields (1 where the program senses the seeds, the other where it shifts the field) but that solution did not work for me.

can someone help me find a solution? thanks
below is the link to the seedlands.py
--------------------------------------
SEEDLANDS.PY:
https://bit.ly/2Kt0smb
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Regarding Ofqual's most recent update, do you think you will be given a fair grade this summer?

Yes (254)
34%
No (493)
66%

Watched Threads

View All
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise