[New to Objective-C, struggling with things that are straightforward in other languages.]
I would like to do something like this:
@interface GameBoard : NSObject {
// ..
GameState *parentGameState;
}
- (GameBoard) initStartGame (GameState *) parent;
so that a GameState (which has a GameBoard pointer as a member) could create a GameBoard that in turn has a pointer back to the GameState that created it.
However, it seems that in Objective-C neither objects nor pointers to objects can be method parameters.
So what's the idiom for creating a pair of objects each of which points to the other? There must be a way, otherwise you couldn't do basic things like e.g. doubly linked lists.