ftp.nice.ch/pub/next/games/board/Ergo.NIHS.bs.tar.gz#/Ergo/Proper_Ending/EmptySquare.m

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

#import "EmptySquare.h"
#import "AbstractFilledSquare.h"	/* for foundLegalMove message decl. */

@implementation EmptySquare

- mouseEntered: (NXEvent *) theEvent {
    [NXApp makeSquaresPerform: @selector(checkAdjacencyWith:) with: self];
    return self;
}	/* above, don't do return [...]; someone may depend on return self */

/* Private methods: */

- checkForLegalMoveFrom: sender {
    if ([self distanceTo: sender] <= 2)
	[sender foundLegalMove];
    return self;
}

- foundAdjacent {  /* were found to be adjacent by checkAdjacencyWith: above */
    return [self setIsHighlighted: YES];
}

@end

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