TABLE OF CONTENTS Flipper Flipper Flipper NAME MKSoft Flipper - Copyright © 1979-1992 (Requires 2.0) Amiga Version: Copyright © 1986-1992 by Michael Sinz - MKSoft Development All Rights Reserved SYNOPSIS Flipper - An Othello game FUNCTION Othello is a rather old board game that actually contains some rather complex feature with simple rules. Also called Reversi in many computer implementations. This implementation has a number of features. In addition to the obvious user interface window and menus and the many command line and tooltype options, Flipper also has support for a full featured ARexx port. Also, Flipper fully supports CTRL-C to exit at almost any time and CTRL-F to bring the window to front. RULES --The rules will go here-- The "turn" is indicated by the indented box around the player's piece in the status bar. In the case where a player can not make a legal move, the turn is automatically passed to the other player. If both players can not move, the game is over. The skill levels are rather interesting. In order to make the lower levels, I used a random move generator for them. The lowest level uses it for most of the game. The higher levels stop using it earlier. At about level 5, the random move generator is never used past the first move. In order to make Flipper play "somewhat" different each time, another random number generator is used. This one is used when two moves look nearly equal in value. This is why Flipper may not play the same game from one execution to another. Note that this choice is only made between "equal" moves and should not cause for a lesser move (as far as the computer is concerned) to be made. INPUTS LEFT/K/N Select the location of the window on the display. It defaults to the left-most area. TOP/K/N Select the location of the window on the display. It defaults to just under the screen title bar. WIDTH/K/N Select the width of the window. HEIGHT/K/N Select the height of the window. SIZEGADGET/S Include the size gadget in the window. FASTMOVES/S Turn on the FastMoves option. PUBSCREEN/K Select the public screen name to open on. PLAYER1/K/N Select the skill level for the Player-1 computer player. The default is HUMAN (or 0). Current value skill levels go from 1 to 9. The lower levels include a larger random factor. PLAYER2/K/N Select the skill level for the Player-2 computer player. DEEPTHOUGHT/S Activate the DeepThought end-game play. This is an option to make high skill level end games play using the DeepThought routines. This can make for much better end-game play by the computer. SHOWMOVES/S Activate the display of legal moves. This is mainly for the human player since it will point out the valid moves that can be made. MACRO/K An optional startup ARexx macro may be supplied here. The default ARexx script extention for Flipper is ".flip" All of the above options can be either selected via the Shell and standard AmigaDOS command line parsing or, when started from Workbench, can be in the tooltypes of the Tool or Project icon. When started from a Project icon, Flipper will use the tooltypes from the first project icon. RESULTS A rather nice Othello playing window. AREXX Flipper also has an ARexx port in it. The port name is "FLIPPER.n" where n is some number from 1 to the number of games running. The Flipper ARexx port is powerful enough to let an ARexx script fully control the game play of the program. In fact, it is possible to write a computer player in ARexx. The ARexx port supports the following commands: QUIT - This is just like selecting QUIT from the menu. The game will exit as soon as possible. RESET - This will reset the game in progress back to the starting positions. (Same as the RESET menu item) GET - This command will return attributes from the game: BOARD - Returns a 64 character description of the board PLAYER - Returns which player's turn it is SETTINGS - Returns the settings of the settings: "SDF,p1,p2" Where S is "S" if ShowMoves, D is "D" if DeepThought, F is "F" is FastMoves p1 is the player 1 play level p2 is the player 2 play level WINDOW - Returns the window position and size as left top width height ABOUT - Returns the program name and version and Copyright information. SET - This command lets you set attributes of the game: SHOWMOVES DEEPTHOUGHT FASTMOVES - These three take ON, OFF, and TOGGLE as arguments. PLAYER1 PLAYER2 - These two take a play level as an argument. The play level ranges from 1 to 9 for the built-in computer and 0 for a human/external player. WINDOW - This takes 4 parameters in the form of left top width height CHECK - This command takes a board position as an argument and returns in RESULT either 0 or 1 depending on if the move was valid. (0 if invalid, 1 if valid) MOVE - This command does the given move. If an invalid move is passed, RC will be set to 5. If the board position is invalid (less than 1 or greater than 64) RC will be 10. WAIT - This command takes an argument of either 1 or 2. It will not return until that player's turn is up *or* the game is over or the program has quit. This is used such that you can write a REXX based Othello player. On return from this command, RC will be 0 in normal cases and 5 for when either the game is over or the program is trying to quit. SHOW - This command forces the Flipper window to come to the front and become active. It is just like sending a CTRL-F. RX - This command will take the argument and execute it as an ARexx macro. This may either tell Flipper to run a macro file or, if it is quoted, to run an ARexx "string file." Flipper's default macro extension is ".flip" RXS - This command will take the argument as a "STRING FILE" ARexx macro command. This is just like quoting the "string file" and using RX. NOTES Well, this could well be the "most ported" program I know. It has been on over 9 different CPU types, on many of which there was more than one version in more than one language. The Amiga version has been through a number of C compilers and operating systems. (The first version ran in AmigaOS 1.0) The original version was written in Fortran and then promptly rewritten in Z-80 assembler and then in Microsoft Basic (TRS-80) and then in Pascal, and then APL, and ... (you get the picture) This program has seen more operating systems and CPUs than I wish to remember... It has gone through many rewrites in many languages. Due to this, the playing skill levels are not quite what seem liniar functions. I have tried to make them somewhat liniar, but for certain players, a lower skill level may well prove itself to be harder than a higher one. SEE ALSO "A master's secrets are only as good as the master's ability to explain them to others." - Michael Sinz BUGS None?