Hi from Italy.
Yup, it means my written english is a disaster.
I'm trying to make a square-enix's Go-like game.
This is my solution for the movement logic (you can -- no, you must -- suggest me another one, if it's better).
I create different type of "tiles".
Every tile has 4 boolean instance variables, to indicate if they have liberties of movement in the four directions or not.
When the player is on a tile and press a direction key, the system contols:
- the liberties of movement of the starting tile
- the liberties of movemente of the destination tile
Example: I press Up. Can I move?
If the starting tile has the Up liberty on True and the destination tile the Down liberty on True, then yes: i can move.
Else, i cannot.
Simple, right? Wrong!
I put all my tiles into a family.
Now, when I press a direction button, I can pick the starting and destination tile from the family... but I can't pick their instance variables!
Any idea? Please, help me. :)
(I hope this will be understandable.)