typedef NS_ENUM(NSUInteger, MyEnum1) {
PackagesNo1 = 1,
PackagesNo2 = 2,
PackagesNo4 = 4,
PackagesNo8 = 8
};
typedef NS_ENUM(NSUInteger, MyEnum2) {
LEVEL0 = 0,
LEVEL1 = 1,
LEVEL2 = 2,
LEVEL3 = 3
};
- (int)packagesNeededForLevel:(int)level {
switch (level) {
case LEVEL0:
return PackagesNo8;
case LEVEL1:
return PackagesNo4;
case LEVEL2:
return PackagesNo2;
case LEVEL3:
return PackagesNo1;
}
}
well done mr junior