ftp.nice.ch/pub/next/games/network/Splat.1.0.s.tar.gz#/Splat-1.0/Greedier.bproj/GreedierComp.m

This is GreedierComp.m in view mode; [Download] [Up]

/*
 * Stratgey: Greedier
 * Description: like greedy, but twice the emphasis on own piece count.
 * Author: John Garnett & Erik_Kay@next.com
 */

#import "GreedierComp.h"

@implementation GreedierComp

+ (const char *)strategyName
{
    return "Greedier";
}

-(int)scoreBoard:(Board *)b forPlayer:(square_state)type
{
    int score;
    score = 10 * 
    	((2 * [b numberOfPiece:type]) - [b numberOfPiece:OTHER_PLAYER(type)]);
    return score;
}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.