DM1-Kriegspiel Refereeby***************************************** *** The Kriegspiel Referee (KRef.EXE) *** ***************************************** This is a program to act as a referee for a Kriegspiel chess game. (See Kriegspiel Rules below.) The player Black goes first to simply enter a password and thereby starts a new game, which is saved as xxx.ksg. (KSG = KriegSpielGame) (xxx=a game name the players choose). If the players are on separate computers, then the game is transferred by any means agreed upon (email, posting on a forum, etc.) to White. Otherwise, it is not necessary to exit and restart the program. White then enters a password and makes the first move. It is then Black's move. If the players are on separate machines, White, who has just been prompted for Black's password, simply elects to not move and sends xxx.ksg to Black. At any time, a player may elect not to move by simply not supplying the password or pressing ESC while selecting a move. The player can continue later by entering the proper password. In the case players are on separate machines and White has just completed a move, it will be Black's turn. Simply do not supply Black's password as above. KRef.EXE will terminate and xxx.kref can be transferred to Black, etc. Game continues until a player resigns or is in checkmate. At that time, the players can finally see the whole board. **************** *** Security *** **************** It is possible that a player could cheat by simply looking at xxx.ksg to see the whole board. To defend against this, xxx.ksg will be encrypted. But the source code is public domain, so the player could modify the source to display the whole board after decryption. To defend against this, there will be a module, GetKey#, which source is not published. This will return a number to be used by these SUBs which are also not public domain: ksgEncrypt and ksgDecrypt. Two subordinate design modules are thus defined: ======= DM2A: Security DECLARE FUNCTION GetKey# () DECLARE FUNCTION ksgEncrypt$ (Key#, Clear$) DECLARE FUNCTION ksgDecrypt$ (Key#, Encrypted$) DM2B modules will obtain Key# via GetKey# and keep it for use in encrypting and decrypting. DM2B modules will define the content of Clear$, however it must be characters in the range 35-128 to allow for easy encryption. Encrypted$ will similarly be in that range to allow for easy transmission. ======= DM2B: The Referee Program *** This is everything else, including writing Encrypted$ to xxx.ksg and vice versa. It will assemble anything that needs to be saved, such as player passwords and game status and the full board, into Clear$ and vice versa. When White resigns, White cannot see the board yet, but must allow Black to logon and acknowledge the resignation. Black can now see the board and can transmit xxx.ksg to White who also can now see it. This defends against a player making a copy of xxx.ksg and then resigning in order to see the board. ****************************** *** Final Integration Plan *** ****************************** 1) DM2B modules are integrated and verified using simulations of GetKey#, ksgEncrypt and ksgDecrypt as defined below. 2) When DM2B is debugged, the developers of DM2A (not DM2B) will replace simulations with final versions and compile. The resulting EXE will be posted and used for game play. 3) The designer of DM2A will be disqualified from playing. However, anyone else can develop their own version of DM2A and compile and post an EXE which others may use to play with. ************************ *** Kriegspiel Rules *** ************************ A referee makes both White and Black moves to play a normal game of chess on a board not seen by the two actual players. White has a board with White pieces identical to the Referee's. White can place Black pieces as desired - they don't count. When it is White's turn and the game is not over due to Black's resignation or checkmate or stalemate, the referee announces any number of the following as appropriate: - White is in check on the long/short diagonal - White is in check on the rank/file - White is in check by a rook/pawn The referee also announces one of the following - White to move - White to move with x possible pawn captures. (Note: a pawn capture may be en passent and Black will be confused and accuse the referee of mistake. Black thereby forfeits the game) White attempts a move. If the move is not possible due to White trying to trick the opponent and attempting something illegal such as moving a pawn backward, the referee announces - Illegal move If the move is not possible due to White attempting a move that can't be done due to placement of Black's pieces, the referee announces - Not possible If the move results in the taking of a Black piece/pawn, the referee announces - Piece gone (doesn't say which one) - Pawn gone If the move results in the promotion of a pawn, the referee announces - White promotes a pawn (It is now Black's turn. Etc.)
from IP address 68.98.164.60 |
| Response Title | Author and Date |
| DM2B-The Referee Program | on Jan 14 |
| DM3BA-Play Game | on Jan 18 |