Evol IPD: Player.m
...
int iParam[4] = {1, 1, 0, 0};
int pParam[4] = {1, 1, 0, 0};
int qParam[4] = {1, 0, 1, 0};
@implementation Player
-setPlayerType: (int) pt {
type = pt;
return self;
}
-(int) getPlayerType {
return type;
}
...
-step: (int) time {
if (time==0)
newAction = iParam[type];
else {
if (memory==1)
newAction = pParam[type];
else
newAction = qParam[type];
};
return self;
}
@end
Previous slide
Next slide
Back to first slide
View graphic version