This is CardManager.h in view mode; [Download] [Up]
// CardManager.h // Part of Risk by Mike Ferris #import <objc/Object.h> @interface CardManager:Object { id theGameSetup; id theMapView; id deckInspector; // cardPanel outlets id theCardPanel; id doneButton; id cancelButton; id amassedTextField; id handScrollView; id handMatrix; id handStarMatrix; id playBox; id playMatrix; id playStarMatrix; id turnInButton; id worthTextField; id forceTextField; // first a list which has all the cards id cardList; // a single card with the card back on it id cardBack; // then a list for the deck and one for the discards id deck, discards; // each player gets a hand id playerHand[6]; // card panel internals id currentSet[3]; int currentIndices[3]; int playMatrixCount; int currentPlayer; id cardsPlayed; int currentSetsTurnedIn; int currentForceNum; //the random number generator id rng; int setsTurnedIn; } + initialize; - init; - appDidInit:sender; - free; // low-level list manipulators - shuffle:list; - shuffle:list1 into:list2; - reset; // methods for manipulating player's hands - playerDrawsCard:(int)p; - playersHand:(int)p; - (int)numCardsForPlayer:(int)p; - (BOOL)canMakeSetCard1:c1 card2:c2 card3:c3; - (BOOL)canPlayThree:cardList; - (BOOL)canPlayFrom:cardList; - (BOOL)canPlayerPlay:(int)p; - player:(int)p1 takesCardsOf:(int)p2; - (int)player:(int)p playsCards:cl; // high-level interface routines - setupPanel:(BOOL)canPlay forPlayer:(int)p; - (int)runCardPanel:(BOOL)canPlay forPlayer:(int)p; - handAction:sender; - playAction:sender; - stopAction:sender; - turnInAction:sender; - setDeckInspector:anObject; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.