// ScoreGoal.m
// Project: Cribbage
// Stephan Wacker
// 93-09-27


#import "ScoreGoal.h"

#import "Cribbage.h"
#import "Preferences.h"


@implementation ScoreGoal


- initFrame: (const NXRect *) frameRect
{
    [super initFrame: frameRect];
    [self setOpaque: NO];
    
    return self;
}


- (int) limit
{
    id		preferences = [[NXApp delegate] preferences];
    
    if( preferences ) {
	return [preferences limit];
    } else {
	return [Preferences defaultLimit];
    }
}


- (NXPoint) pegCoords
//
// Return center of the view.
//
{
    NXPoint	result;
    
    result.x = NX_MIDX(&bounds);
    result.y = NX_MIDY(&bounds);
    
    return result;
}


@end	// ScoreGoal
