Rocky Rocha wrote:Basically, I have to update all of the squares at the same time. How do I do that?
You stash the updated values somewhere else, and then when you've calculated all of them, you copy them back to where the original values are.
Or alternatively: you copy all of the original values somewhere else, and then use the somewhere-else values to compute the new original values.