Exercise 1c
int matrix[2][2][2] = {{{3,0},{5,1}},
{{3,1},{5,0}}};
@implementation Player
-init: (int)n rowPlayer: (BOOL)rp playerType: (int)pt {
name = n;
rowPlayer = rp;
playerType = pt;
return self;
}
...
-(BOOL)move {
return matrix[playerType][!row][col] >
matrix[playerType][row][col];
}
Previous slide
Next slide
Back to first slide
View graphic version