I'm getting a little confused how to set up a class that's two steps below the top-most one.
For instance, say I have a game called BoardGame. One of whose parameters in numberOfSquares.
The classes are setup like this:
BoardGameSetupViewController > BoardGamePlayViewController > GameEngine
BoardGameSetupViewController creates an instance of BoardGamePlayViewController after the number of squares has been chosen. BoardGamePlayViewController has the GameEngine class as a @property which has been @synthesised.
So how would I set up that GameEngine directly from BoardGameSetupViewController? To set up the numberOfSquares for instance?
So in BoardGameSetupViewController, I want to set the properties of the engine, but they don't seem to get passed on.
BoardGamePlayViewController *boardGamePlayViewController = [[BoardGamePlayViewController alloc] initWithNibName:@"BoardGameView" bundle:nil];
// this line doesn't work
boardGamePlayViewController.gameEngine.numberOfSquares = 12;