The objects: Player
...
@interface Player: SwarmObject {
int name;
int alive;
id other;
}
-init: (int) n;
-setOther: o;
-(BOOL)isAlive;
-play: r;
@end
Variables: Player knows
His own name
Whether he is alive
Idenity of other player
Behavior: Player can
Set variables
Respond to “alive?”
Use revolver
Previous slide
Next slide
Back to first slide
View graphic version