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

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

/*
 * Stratgey: Greedy
 * Description: maximize (positive) difference between number of own pieces and
 		number of opponent's pieces
 * Author: Erik_Kay@next.com
 */

#import "GreedyComp.h"

@implementation GreedyComp

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

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

@end

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