If I'm understanding correctly you can use NSNotification to do what you want. In your puzzle class you can use postNotificationName to tell any class that's observing when the puzzle changes state. To register a class as an observer to the puzzle, use the addObserver and removeObserver methods. Here are the definitions for the three methods:
-(void) postNotificationName:(NSString *) aName object:(id)anObject userInfo:(NSDictionary *)aUserInfo;
-(void) addObserver:(id)observer selector:(SEL)aSelector name:(NSString *)aName object:(id)anObject;
-(void) removeObserver:(id)observer name:(NSString *)aName object:(id)anObject;
Here is some example code to use these for your program:
In your puzzle class, in the function that changes state:
[[NSNotificationCenter defaultCenter] postNotificationName:@"puzzleChangedState" object:self userInfo:NULL]
// if you want to send out moreInfo, like other variables, use userInfo with a dictionary object
In your controllers, or views, etc... wherever you want to get the puzzle changed state message:
//In your constructor or initialization method, register this class with the puzzle class
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePuzzleChangedState:) name:@"puzzleChangedState" object:nil];
This will add your controller to the NotificationCenter and when the puzzle class posts a notification of "puzzleChangedState", your controller's handlePuzzleChangedState: method will be invoked.
Here is the handlePuzzleChangedState: function:
-(void) handlePuzzleChangedState:(NSNotification *) notification
{
//handle your puzzle state change here
}
If you want more help here's the docs:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Notifications/Introduction/introNotifications.html#//apple_ref/doc/uid/10000043i
Hope it works out!