"Rotate" By Robert Newman ARCADIAN 6, no. 11/12 (October 31, 1984): 116. From the Arcadian: "ROTATE" is a sort of 2-D Cube plus "15-puzzle," where scrambled letters have to be placed in alphabetical order by rotating a 2x2 square segment within the total board. Rotate a 2x2 square by keying in the letter in the upper-left hand corner of that square, and so put the whole board in order. One special move will interchange two horizontally adjacent letters at each reset if you enter "3", then the left letter of the pair. Reset by entering "R". Correct a wrong rotation with "T". Quit with "Q". Keypad entry for each move of answer, reenter game after seeing part of answer by "t" key, or "GO" key for full speed. "LEVEL" equals approximate difficulty. We have a lengthy description of the operation of this game, what the computer is doing, etc., which we will send to you, on receipt of a long stamped, self- addressed envelope (LSSAE) (Robert Fabris). The material that Bob is referring to is among the "Bob Fabris Collection," and it has been scanned in. It is certainly worth a look. Bob sent the additional paperwork to someone named Al with a note that said, "See anything interesting?" Al replied, "This looks like an interesting and challenging game. Mr. Newman spent a lot of effort in describing the game and how the program works. This is something most authors fail to do adequately. It also appears that he has made efficient use of the Bally's limited memory." Below are the complete directions taken from Robert Newman's complete nine-page program listing and description. Note, that there is still PLENTY more by looking at the original listing sent to the "Arcadian," as it describes in GREAT detail exactly how the program works. It may be the most detailed AstroBASIC listing and description ever sent to the "Arcadian." ROTATE A 4x4 playing board contains the letters A-P in scrambled order. A group of letters in a 2x2 square on the board is rotated one position clockwise by keying in the letter in the upper left corner of the square. The object is to put the board in alphabetic order (ABCD) on the top row, etc. in as few moves as possible. In addition to rotating groups of letters you have one special move which will interchange a pair of horizontally adjacent letters. To make a special move, enter "S", then the left letter of the pair. If you're a fumble fingers like me and accidentally rotate a letter you didn't want to, enter "T" and the square will continue to rotate until it returns to its former position. To restore the board to its original setup before any moves were made, enter "R" (for Reset). With each reset you get one special move. To quit, enter "Q". The difficulty of any given puzzle corresponds roughly to the level D which is input by the player. Some of you may have seen "Rotate" on other systems, or in a book of computer games. No originality is claimed for the basic idea, rotating groups of letters on a 4x4 board. What DOES seem to be original in this version is the way the computer randomizes the board by rotating the letters in its memory in a direction opposite to that of a player trying to reorder the board. Once this randomizing scheme was hit upon (a case of serendipity, to be sure), it was obvious that if the computer took D counterclockwise rotations to randomize the board, it should be possible for the player to reorder the board with D clockwise rotations (if he is smart enough, anyway). Since D can be specified by the player, the level of difficulty can be selected according to the player's ability or mood. Since the computer stored each of its moves as it randomized the board, its answer is available for display. After first restoring the board to its original setup, the computer changes it accordingly as it prints each move until the board is in proper alphabetic order. Since the computer can make its moves quite rapidly. I have it wait for a keypad input, before each move except the first, so that each move can be studied at one's leisure. To get back into the game, press the divide key, or press the "GO" key to have the computer print out the rest of the answer at full speed. Regular Moves Regular moves are specified by keying in the letter occupying the upper left corner of a 2x2 square. Each of the letters in the square then rotates one position clockwise. Nothing will happen if an attempt is made to key in a letter in the bottom row or rightmost column. Special Moves A special move interchanging: two horizontally adjacent letters is accomplished by entering "S" and then the left letter of the pair to be interchanged. If an attempt is made to enter a letter in the right-hand column, the entry of the previous "S" is nullified. If a "T" entry immediately follows an "S" entry, the "T" is acted upon, and the "S" is also nullified. One special move is allowed during the initial game and each reset. After a special move is made, a message appears indicating such. Once this message appears, and provided that there are no intervening resets, any further "S" entries will be ignored and the following entry treated as a regular move. Resets If the player thinks of a better strategy, or would otherwise like to start over again, an entry of "R" will restore the board to its original setup. A player may reset as often as desired; the reset itself does not count as a move. After each reset a message will appear indicating how many resets have been made and the TOTAL number of moves up to the current reset. "MOVE # XX?" is asking for move number XX of the current reset. The computer also resets the board to display its answer, and this will be reflected in the reset count. Finally, the computer resets the board when "N" is entered in response to "NEW GAME? (Y/N)", but in this case there is no reset message. "T" (Try Again) Entries If you should inadvertently rotate a letter you did not mean to rotate, input a "T" and the letters will continue to rotate until they come to their previous position. Note that the move counter is also changed accordingly, so that you are not charged for your mistake. "T" entries are ignored unless a regular move has just been made. Multiple "T" entries are also ignored. Quitting You may quit by entering a "Q". One of the messages which will appear after a "Q" entry is "ANSWER? (Y/N)". A "Y" response to this message will cause the computer to reset the board, display and make the first move, and wait for a keypad input. Any keypad input other than "GO" or divide sign will cause the computer to display and make the next move, and wait for another input. By pressing the divide key you may reenter the game. If you do not reenter the game the program will reset the board and ask "NEW GAME? (Y/N)" after the last stored move is displayed. If the "GO" key is pressed the computer will display its stored answer at full speed without waiting for further input (hence no opportunity to try the current puzzle again except as a new player). A "N" response to "ANSWER? (Y/N)" will cause the program to go immediately to "NEW GAME (Y/N)", with consequent resetting of the board. Additional Notes Answering "N" to "NEW GAME? (Y/N)" resets the board and all relevant variables (except as noted below), and allows a new player a fresh start on the same puzzle after someone else has given up. Answering "Y" starts the program over and requests a new difficulty level. If 10 moves of a level 15 puzzle have been displayed, obviously what remains is no longer a level 15 puzzle, but a level 5. A reverse box to the left of the board shows how many moves the computer has revealed, if any. This will continue to be displayed, with the new colors that appear when the answer is asked for, even if a new player tries to solve the same puzzle, since they may have also seen the solution and it would otherwise be too easy to cheat. If you reenter the game by pressing the divide key, you may notice that the moves the computer made are charged to you. Nothing is free these days. As noted before, the level is only an approximate indication of the difficulty of a puzzle. For example, some level 3's may be more difficult than some (very few) level 5's. Also, beyond a certain point which I have never bothered to pin down, but which I think is somewhere in the 20's, the higher the level, the easier it is to get the "WOW! SMARTY!" message which appears when you take fewer moves to solve the puzzle than the computer did to set it up. In any case, it is more challenging to get this message if you do not make a special move. There are a variety of messages that come up when you solve the puzzle. I think these are fairly self-explanatory. "ME" refers to the computer as it tells you how many more or fewer moves it took you to solve the puzzle than the computer took to set the puzzle up (the difference between the number of your moves and the difficulty level). The system that I saw "Rotate" on and which gave me the basic idea of rotating groups of letters took approximately 6800 bytes, and did no more than give direction, set up a random board, perform and keep count of regular and special moves, and print messages saying how many moves you made before emitting or winning. There were no solutions, no resets, no error corrections, et cetera. I no longer have access to that system, and never did study the listing to see where all that memory was going, but find myself wishing that Bally had even half as much. Maybe then we could afford to waste a few bytes too. "Rotation" lends itself to endless variations - let me know of any possible improvements you might hit upon. I would also be very interested to know what is the lowest level you are able to get the "WOW! SMARTY!" message on, both with and without special moves. It would be especially interesting if anyone could beat the same puzzle both ways. How many regular moves (and which?) would be equivalent to one special move? Running the Program In order to save memory, all variables are not cleared at the beginning of the program. However, key variables are cleared later at appropriate places. This should cause no problem provided the machine is reset prior to inputting the program, and provided that a "Q" entry is used rather than the halt button when a new puzzle is desired in the midst of a game The documentation that is provided with "Rotate" goes on in great length, but the rest does not describe how to play the game.