Hi Swiftelf,
I understand where you are coming from when you want an easier way to resolve the checking.
Let’s take a simple example of a game of Tic-Tac-Toe, now to determine the winnig position, lets say on the given board
1|2|3
-±±
4|5|6
-±±
7|8|9
you have to check for the combinations of 1-2-3, 4-5-6, 7-8-9, 1-4-7, 2-5-8, 3-6-9, 1-5-9, 3-5-7. For the simplest of games, you have to check these 8 combinations, for your game, not knowing what you r board is like, suggesting an easier way to check is going to be difficult.
All I can say without knowing much about your app is that the winning positions are when there are boxes in between the two orange boxes, right?
so, take for example a board with 10x10 squares and the orange block that determine the start and the end are at either ends, i.e. 2B and 7G
Now you know that to determine the winning sequence, you have to get a connected path from 2B to 7G, each position has 8 squares around it, you you have to check for the presence of a White block that is in either of the 4 directions (N, E, W or S) and keep transversing till you reach 7G, if you cannot reach 7G then it is definitely not connected. It is almost like solving the maze solution problem.
Games will be a bit of hard work, there are no simple solutions, wish there were.
cheers,
Jayant C Varma [import]uid: 3826 topic_id: 3418 reply_id: 10445[/import]