I've added in the "print" functions for diagnostic purposes. As you can probably tell "topshapes" and "nextshapes" are 2D arrays, and "shapes" is a 3D array. "i", "j", and "k" are variables that increment up by one in each of the "for" statements that the above code is contained within, and "u" is a random bit, and "v" is NOT(b), althought that might not be important.
Now, because nothing happens to change the value of any of the entries in the "topshapes" array between the two sets of "print" functions, you'd expect the output of the program to be something like this:
The bolded part above implies to me that something has been done to change the value of an entry in the array "topshapes" between the two sets of print statements. Since there's no function that affects the value of "topshapes," though, I don't know how this can be.
Anyone have any thoughts? Any help would be much appreciated. I'm happy to provide more information if need be.