import random
world_size=8
for i in range(world_size)chunk_type=random.randint(1,2)print(chunk_type)
import randomclass chunk_type():chunk_type=random.randint(1,2)world_size=8for i in range(world_size):chunk_type()print(chunktype.chunktype)
both pieces of code don't work
I am trying to make a 2d game using Ursina. All has gone well until I made terrain. The looping of terrain works well but when I try to make the types of chunks random the radiant function only works once. How do I fix this? By The Way I am new to stack overflow so this would be a great help.
The above code should output should output a string of 8 random numbers between 1 and 2. I have tried update methods while true methods and the method for I in range. The radiant method only worked once so when I printed the variable for debugging it just reads all 1s or 2s. What can I do? There is no error messgae as the randiant function only works once.