home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1996 June
/
MACPOWER-1996-06.ISO.7z
/
MACPOWER-1996-06.ISO
/
MacPowerオリジナル
/
キョービのプログラマー
/
リバースクライアント東山1
/
東山通り.proj
/
reverseClient.GLBL
next >
Wrap
Text File
|
1996-04-01
|
3KB
|
105 lines
'--------------------------------------------------
'----------------- ReverseClient.GLBL -------------
'------------- Reverse Client Program -------------
'--------------------------------------------------
' Original C version by Takuji Matsubara
' FutureBASIC II porting by Takayuki Nakano
'--------------------------------------------------
'============ constants ============
_ReverseMessage = _"rEVe"
_YourTurn = 0
_YouWin = 1
_YouLose = 2
_Drawn = 3
_AreYouReverse = 998
_YesIam = 999
_EmptyCell = 0
_BlackStone = 1
_WhiteStone = 2
_BoardSize = 10
_MaxPlaceableCell = 96 '_MaxPlaceableCell = _BoardSize*_BoardSize-4
'------------- define window size -------------
_WindowRectResType = _"RECT"
_WindowRectResID = 128
'------------- define STR# 128's Index Number -------------
_STRWndTitle = 1
_STRWaitingConnection = 2
_STRWaitingStartGame = 3
_STRGameStarted = 4
_STRWin = 5
_STRLose = 6
_STRDrawn = 7
'------------- menu constants -------------
_mApple = 127
_iAbout = 1
_mFile = 1
_iQuit = 1
_mEdit = 2
_iUndo = 1
_iCut = 3
_iCopy = 4
_iPaste = 5
_iClear = 6
'------------- ALRT ID's -------------
_ErrorALRT = 129
_AboutALRT = 128
'------------- AppleEvent constants -------------
_kCoreEventClass = _"aevt"
_kAEOpenApplication = _"oapp"
_kAEOpenDocuments = _"odoc"
_kAEPrintDocuments = _"pdoc"
_kAEQuitApplication = _"quit"
_typeAEList = _"list"
_typeFSS = _"fss "
_keyDirectObject = _"----"
_errAEEventNotHandled = -1708
_receiverIDisTargetID = &00005000
'------------- for think routine -------------
'========== globals ==========
DIM gLastReceivedServerID.252
DIM gProgramEnds%
'------------- AppleEvent globals -------------
DIM gOpenDocAEPtr& , gPrintDocAEPtr&
DIM gOpenApplAEPtr&, gQuitApplAEPtr&
DIM gWndCnt%
'------------- record types -------------
DIM RECORD ReverseRec 'host -> client
DIM RevMessage& '_YourTurn OR _YouWin OR _YouLose OR _Drawn OR _AreYouReverse
DIM myStoneR& '_BlackStone OR _WhiteStone
DIM board.100 'current status of game board
'100 = 1 * _BoardSize * _BoardSize <-- FutureBASIC can't use array in record
DIM END RECORD .ReverseRec
DIM RECORD PlaceRec 'client -> host
DIM myStoneP& '_BlackStone OR _WhiteStone
DIM placeCell.4 'cell number that you want TO place stone.
DIM END RECORD .PlaceRec
DIM RECORD PlaceInfo
DIM nCell& 'number of cells that you can place stone.
DIM pt.384 'cell numbers that you can place stone.
DIM nReverse.384 'number of reverse stones that when you place stone.
'384 = 4 * _MaxPlaceableCell <-- FutureBASIC can't use array in record
DIM END RECORD .PlaceInfo
'------------- for think routine -------------