I have an array (2 dimensions each with 10 units) each cell of the array could be a number from 1 to 8
I need to check from a particular location in the array, whether or not the cels adjacent (horiz and vert, not diagonal) are the same number, and if they make a sequence of three or more of the same number in a row.
Does this make sense?
Unfortunately, I cant paste the code I have because that's on my lappy at home, and I cant bring that in here to work.
here's an example anyway....
(imagine the test is based on the central cel of the portion of the array displayed)
13315
45642
48216 = POSITIVE - the '2's in column 3
21275
21242
21452
25178
82145 = NEGATIVE - no sets of 3 in a row
57216
82751
16524
82444
72145 = NEGATIVE - the row of '4's does not include the central cel
13361
87215
87215
21563
33331 = POSITIVE - the '3's count because they include the central cel
42156
24152
28351
21562
14341 = NEGATIVE - The '3's are only two in a row.
32345
21785
Anyone got any functions or routines to help with this?
I will try and get my code on a floppy and bring it to work so I can post it here...
I need to check from a particular location in the array, whether or not the cels adjacent (horiz and vert, not diagonal) are the same number, and if they make a sequence of three or more of the same number in a row.
Does this make sense?
Unfortunately, I cant paste the code I have because that's on my lappy at home, and I cant bring that in here to work.
here's an example anyway....
(imagine the test is based on the central cel of the portion of the array displayed)
13315
45642
48216 = POSITIVE - the '2's in column 3
21275
21242
21452
25178
82145 = NEGATIVE - no sets of 3 in a row
57216
82751
16524
82444
72145 = NEGATIVE - the row of '4's does not include the central cel
13361
87215
87215
21563
33331 = POSITIVE - the '3's count because they include the central cel
42156
24152
28351
21562
14341 = NEGATIVE - The '3's are only two in a row.
32345
21785
Anyone got any functions or routines to help with this?
I will try and get my code on a floppy and bring it to work so I can post it here...