In the code here:
movexy = posgrid[tileclicked1] #
while movexy[x] > tempxy[x]:
print movexy
print posgrid[tileclicked1]
movexy[x] -= 1
Where the value of posgrid[tileclicked1] = [75, 120]
And the variable x = 0
I've encountered the problem that when I subtract one from movexy[x]
, one is also automatically subtracted from the list from which it got it's value, posgrid... How come? I create the movexy
list only in order to have the posgrid
list remain unchanged. Why does this happen?