This is ConservativeComp.m in view mode; [Download] [Up]
/*
* Stratgey: Conservative
* Description: avoid jumps if possible
* Author: Erik_Kay@next.com
*/
#import "ConservativeComp.h"
@implementation ConservativeComp
+ (const char *)strategyName
{
return "Conservative";
}
+ (int)scoreBoard:(Board *)b forPlayer:(square_state)type
{
int sc;
sc = ([b numberOfPiece:type] -
[b numberOfPiece:OTHER_PLAYER(type)]);
if (IS_JUMP(b->currentMove))
sc -= 3;
return sc;
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.