/*
 * Stratgey: <Close> try to stay close to 5 ahead of your opponent
 * note: this seems to work well against aggressive opponents
 * author: Erik_Kay@next.com
 */

#import "CloseComp.h"

@implementation CloseComp

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


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

@end
