I'm cloning Super Puzzle Fighter (II?) that was on the PS1. If you're not familar with the game you have 4 colors of blocks fall and if a rectangle of size 2x2 or bigger of the same colors meet they form a larger block, a single larger block. If I have my array of information say:
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 3 3 0
1 1 0 4 4 0
1 2 2 4 4 3
3 2 2 4 4 4
1 3 2 4 4 4
How could I determine where a large block should go? I've been fighting with this function for a while.
Simple example are the 2's. What do I use? Another array? Some other data structure? And once a larger block is made it needs to stay. For example the 4's, if the tower of fours (2w, 4h) was created first then that block needs to stay when the right most 4's land, and not make a 3x2 with a 2x2 on top, and vicea versa.
Also the blocks are made as new ones land, the small blocks come two at a time. so this:
.....2 1
.....|..|
.....\/\/
2 2
2 2 2 would be a block 2x2 with a single on its lower right side.
but when the 2 hit the bottom it would become a 3x2. If you know the game it helps.
Any ideas? I know this is a BIG question but I'm hoping someone else has does this clone and/or has a flash of genius.
NOMAD
