View Full Version : Recursive checking algorithm


laxweasel
06-05-03, 08:09 PM
OK...A friend of mine REALLY needs help on this so it would be much appreciated any ideas. The idea is a rcursive checking algorithm for a set of blocks that when one "falls" it recursively (spelling?) checks all the blocks around it to see if they fell. I am thinking it may be somewhat derived from a tree traversal algorithm but I am not sure. Please help!

*edit* The blocks are set up stacked = <--like that in rows and colums like a matrix. There is no "gravity" just a relationship between the blocks so each block needs to be checked. So now it appears it is more like a list traversal. Still help please!

AntonK
06-05-03, 10:30 PM
I think i can get it...can u draw a picture to better illustrate? Sorry, I am a visual guy.

-AntonK

laxweasel
06-06-03, 02:43 PM
OK nevermind...problem solved. For those of you interested it was a Matrix and you just needed to recursively check the blocks around it when one changed.

Anyway to the Admin: you may take this down now.

AntonK
06-06-03, 04:52 PM
We don't typically take down posts.....no point. Someone else may come in, have a similar problem, and now know who to go to.

-AntonK

laxweasel
06-26-03, 08:36 PM
Yea well in that case so everyone knows, the way the problem was set up it was just like any recursive tree traversal, checking each branch. Thanks anyway.