ftp.nice.ch/pub/next/games/network/Splat.1.0.s.tar.gz#/Splat-1.0/BoardView.h

This is BoardView.h in view mode; [Download] [Up]

/*
 * BoardView.h
 * Description:
 * 	a view that knows how to draw a game board for a two player game 
 *	with a grid board like checkers, chess, reversi or attaxx
 * History:
 *	14-Feb-93 Erik Kay - created
 */


#import <appkit/appkit.h>
#import "Board.h"

@interface BoardView:View
{
    Board *board, *boardCopy, *newBoard;
    move currentMove;
    int selectedRow, selectedCol;
    int highlightedRow, highlightedCol;
    id	game; // the delegate
    int cols,rows;
    int squareSize, pieceSize;
    int numAnimationFrames;
    int curFrame, direction;
    DPSTimedEntry moveEntry, changeEntry;
    BOOL scalable;
    BOOL abortGame;
}

- selectSquare:(int)col :(int)row;
- (int)selectedCol;
- (int)selectedRow;
- setGame:g;

// draw a square
- drawSelectedSquare:(NXRect *)rect at:(int)col :(int)row;
- drawEmptySquare:(NXRect *)rect at:(int)col :(int)row;
- drawObstruction:(NXRect *)rect at:(int)col :(int)row;
- drawPlayerOne:(NXRect *)rect at:(int)col :(int)row;
- drawPlayerTwo:(NXRect *)rect at:(int)col :(int)row;
- drawSquare:(int)col :(int)row;
- redrawBoard;

// move animation
- doMoveAnimation:(move *)mv;
- doAnimateMove;
- animateMove;
- finishMoveAnimation;

// change animation
- doChangeAnimation:(Board *)orig;
- doAnimateChange;
- animateChange;
- finishChangeAnimation;

// the board
- setBoard:(Board *)b;
- (Board *)board;

// misc
- gameOver;
- resetBoardView;
- setScalable:(BOOL)f;
- (int)numAnimationFrames;

@end

@interface Object (BoardDelegate)
- squareHit:(int)col :(int)row;
- moveAnimationFinished:(move *)mv;
- changeAnimationFinished;
@end

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