Hello, I am trying to make 52 card deck with couple of players, in objective c. I am a freshman. after the interface section I confused, and could not move on.
#import <Foundation/Foundation.h>
@interface cards : NSObject
@property int* spade;
@end
@interface spade : cards
@property int spadeCards;
@end
@interface heart : cards
@property int heartCards;
@end
@interface diamond : cards
@property int diamondCards;
@end
@interface club : cards
@property int clubCards;
@end
@interface players : NSObject
-(void) player;
-(void) print;
@end
@interface dealer : NSObject
-(void) deal: (int) d;
@end
** i wanted to create 4 objects under the object of cards . My aim for the implementation part is to create 13 cards for each by giving them numbers and for the face cards i want to point them to string for print function.
My problem is, as i said earlier, i am a freshman; i do not know how to put numbers in an array and use them as objects. :/
@implementation cards
@synthesize spade;
@end
thank you for help !
#import <Foundation/Foundation.h>
@interface cards : NSObject
@property int* spade;
@end
@interface spade : cards
@property int spadeCards;
@end
@interface heart : cards
@property int heartCards;
@end
@interface diamond : cards
@property int diamondCards;
@end
@interface club : cards
@property int clubCards;
@end
@interface players : NSObject
-(void) player;
-(void) print;
@end
@interface dealer : NSObject
-(void) deal: (int) d;
@end
** i wanted to create 4 objects under the object of cards . My aim for the implementation part is to create 13 cards for each by giving them numbers and for the face cards i want to point them to string for print function.
My problem is, as i said earlier, i am a freshman; i do not know how to put numbers in an array and use them as objects. :/
@implementation cards
@synthesize spade;
@end
thank you for help !