Stuck on logic issue please help
polimerjones
Member Posts: 50
I have a grid that is 8x10.
i want to check the first three numbers in the grid at location 1-1 (row 1 column 1) 1-2 and 1-3
after this i want to do a check for the next 3 at 1-2, 1-3, 1-4
then 1-3, 1-4, 1-5
then 1-4, 1-5, 1-6
then 1-5, 1-6, 1-7
and finally 1-6, 1-7, 1-8
now that is easy but i need to also have it check each row 2-1, 2-2, 2-3...... and so on up to the last row
now that is still kinda easy but to make it worse it need to do this for sets of 4s, 5s, 6s, 7s, and 8s
meaning after the 1-2, 1-3, 1-4 up to 10-1, 10-2, 10-3 run i need 1-1, 1-2, 1-3, 1-4 for the fours and going up like previously 1-2, 1-3, 1-4, 1-5 till the ending number hits 8 (the grid size).
this may not make much sense but i tried to explain the best i could. I didnt even want to post this but i have been stuck on a this for a few days now.
if i did each check individually i would be forced to make 498 rules to do each one.
i want to check the first three numbers in the grid at location 1-1 (row 1 column 1) 1-2 and 1-3
after this i want to do a check for the next 3 at 1-2, 1-3, 1-4
then 1-3, 1-4, 1-5
then 1-4, 1-5, 1-6
then 1-5, 1-6, 1-7
and finally 1-6, 1-7, 1-8
now that is easy but i need to also have it check each row 2-1, 2-2, 2-3...... and so on up to the last row
now that is still kinda easy but to make it worse it need to do this for sets of 4s, 5s, 6s, 7s, and 8s
meaning after the 1-2, 1-3, 1-4 up to 10-1, 10-2, 10-3 run i need 1-1, 1-2, 1-3, 1-4 for the fours and going up like previously 1-2, 1-3, 1-4, 1-5 till the ending number hits 8 (the grid size).
this may not make much sense but i tried to explain the best i could. I didnt even want to post this but i have been stuck on a this for a few days now.
if i did each check individually i would be forced to make 498 rules to do each one.
Comments
Either way, automating just the 498 horizontal combinations would take about 16 seconds to loop through. I suggest that you make a loop over the 10 rows, grouping all the checks for an individual row manually into each cycle.
However, maybe explain what and when the checking needs to take place. Can the checking not be triggered by the individual actors? See if you can't make the check event based rather than looping over the whole grid over and over.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com