I have a 5 X 5 grid with each cell having a value of 1 or 0 depending on whether the cell is 'active' or 'inactive'. If 5 cells are active consecutively then it forms a row or column whichever the case may be. Under these conditioins there are 13 possible situations to take into account: 5 rows, 5 columns, 2 diagonals and the four corners plus the center square. I need to find a solution to determine which two are active or three or four for that matter without having to check something like if A = 1 and B =1, if A = 1 and C = 1, and so on....any ideas?
Thanks.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only