so I have this cellular automata project located here on repl https://replit.com/@lighteningboltb/cellular-automata
in it I have two dictionaries grid and grid2. grid is not supposed to be edited during computation of the next step except this one line of code fullcompute grid = grid2 that is the only thing that should change grid but somewhere all of the values of grid get cleared and I don't know why. I use the values
height? 5
length? 5
move amount? 1
up1
right2
left3
down4
for testing and my goal is to have the last grid look like
0 0 0 0 0
0 1 1 1 0
0 1 2 1 0
0 0 1 1 0
0 0 0 0 0
but it always looks like this because grid gets cleared
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
all I need to know is why a. grid2 gets cleared then making grid clear b. why grid gets cleared thanks