home *** CD-ROM | disk | FTP | other *** search
- #ifndef BOARD_H
- #define BOARD_H
-
- #include "Contest.h"
- #include "Rules.h"
-
- #include <QuickDraw.h>
- #include <String.h>
- #include <Types.h>
-
-
- #define kBoardSaved 12
-
- // In theory, to be absolutely sure an KO position isn't reached, all boards played
- // would have to be stored, and a possible move would have to be compared against
- // all past boards.
- // This would be a terrible waste of time near the end of a long game,
- // so I cheat a little by only remembering the last few boards,
- // and hope a long gone board position doesn't reappear again.
- // If is does, this program may make an illegal move according to the contest rules,
- // but the probability that this happens is really small.
-
- void InitBoard (void);
- void OpenBoard (void);
- unsigned long CheckSum (BoardPtr);
- short EndOfGame (void);
- Boolean ProcessMove (MovePtr, Boolean animate);
- BoardPtr CurrentBoard (void);
- BoardPtr RecentBoard (void);
- void PushBoard (BoardPtr newBoard);
- short BoardsOnStack (void);
- Boolean PopBoard (void);
- Boolean EqualBoards (BoardPtr, BoardPtr);
- unsigned char Players (void);
- void CopyBoard (BoardPtr from, BoardPtr to);
- short AutoPlay (void);
- Point FieldToLoc (Field f);
- Boolean FieldHasCurrentPlayersBall (Field f);
- char FieldOwner (Field f);
- void InvalItems (WindowPtr window);
- void SizeItems (WindowPtr window);
- Boolean MoveIsKO (MovePtr, short level, short player);
- Boolean BoardIsKO (BoardPtr testBoard);
-
- #endif
-
- #ifdef BOARD_C
-
- #include "Compute.h"
- #include "Connection.h"
- #include "Error.h"
- #include "Game.h"
- #include "Global.h"
- #include "Interface.h"
- #include "Menu.h"
- #include "Settings.h"
- #include "SoundPlay.h"
- #include "Strategies.h"
-
- #ifndef THINK_C
- #include <Events.h>
- #include <Fonts.h>
- #include <Memory.h>
- #include <OSEvents.h>
- #include <OSUtils.h>
- #include <Picker.h>
- #include <QDOffscreen.h>
- #include <QuickDraw.h>
- #include <StdIO.h>
- #include <StdLib.h>
- //#include <SysEqu.h>
- #include <TextEdit.h>
- #include <Windows.h>
- #endif
-
-
- void FrameHexagon (Rect *r);
- void XORBall (Field field);
- void DrawBall (Field field, char color);
- void DrawField (Field field);
- void EraseBall (Field field);
- void InvalBall (Field field);
- void ShowMove (MovePtr move, Boolean animate);
- void ShowPropMove (Field f, short direction, Boolean animate);
- void ShowFlicheMove (MovePtr move, Boolean animate);
- void DrawPoint (Rect *box, short color);
-
- #endif
-
-