finding chains in a Multiarray?

Blitz3D Forums/Blitz3D Programming/finding chains in a Multiarray?

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.

God Im stuck total mental block

I have an array

Dim Grid(10,10)

this contains values between 1 and 9

I am desperate need of a function to find the largest horizonal and vertical chains of identical values
and have it output the Number of chains and each ones size
for animation and scores
when a chain have been found I want to set all value involved to 10

any ideas would be welcome