black
05-29-2006, 10:49 PM
hi all~
there's a game named "Super Puzzle Fighter 2" presented by Capcom, who had ever played it be4 will know its rules:
1. gems have colors(blue, green, yellow and so on);
2. if several gems with same color consists a rectangle those gems will be changed into a huge one, which is called a combo gem;
my question is, when 2 gems get down, how to search and decide which gems could be considered to be a combo one ? i thought recursion as a solution for a few seconds, but soon i realized that recursion has less efficiency caz' we dont know how far we must search, and it is hard to debug once there's a problem within, so any good idea for it(searching) ?
ps: this is my first post, cheers~ :D
there's a game named "Super Puzzle Fighter 2" presented by Capcom, who had ever played it be4 will know its rules:
1. gems have colors(blue, green, yellow and so on);
2. if several gems with same color consists a rectangle those gems will be changed into a huge one, which is called a combo gem;
my question is, when 2 gems get down, how to search and decide which gems could be considered to be a combo one ? i thought recursion as a solution for a few seconds, but soon i realized that recursion has less efficiency caz' we dont know how far we must search, and it is hard to debug once there's a problem within, so any good idea for it(searching) ?
ps: this is my first post, cheers~ :D