puzzling puzzle

Blitz3D Forums/Blitz3D Programming/puzzling puzzle

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

hi there. im making a columns type game and there are four different colors.

i have a 10 by 10 grid that i store in an array called

dim grid(9,9)

i assign a value to each place on the grid depending on the color: 1=blue 2=yellow 3=red 4=green

now i need to check if 4 or more of the same color are adjacent then i want to assign their positions on the grid to 0.

ive tried different ways (using a recursive function) but it doesnt seem to work!

does anyone have any tips or some code to share?

thanx in advance!