Contents of the QRULES.DOC file

Running QDRAGON

The new QDRAGON.BAS is written in QuickBASIC to exploit the DRAWcommands and to make data entry less tedious. As I understandit, only the SCREEN commands must be changed to suit the graphicsadapter available. The LINE commands have been replaced by DRAWcommands to permit drawing cells that are more exotic than simpleline segments. The default is a line segment drawn in adirection determined by the cell label number. The length of theline segment is determined by scale factor held in the "celllength" variable. If something else is desired, you must typein the appropriate sequence of DRAW commands. Such a sequencewill be sized by the value in the "cell length" variable. Theprogram displays the DRAW commands it will use.

QDRAGON.BAS improves on the user interface but is not yet ideal. It pretends it knows what you want as data and displays what itwill use if you don't enter any data. Pressing Return repeatedlywill show currently recorded data and how the program wants thedata typed in. Pressing F1 at any time will draw the dragondetermined by current data. The program always has complete datato draw some dragon. To enter data for a new dragon, simplyenter the data requested followed by Return. To back up andchange or view previously requested data, end entry with a ].

The first thing the program wants to know is if you want a dragonstored on disk. Pressing Return or ] ignores this request anddisplays the next, or previous, thing it wants. Otherwise youtype in the name of a dragon stored on disk followed by Return or], or F1 if you want the program to draw the dragon you havenamed. Dragons stored on disk contain *all* the data required bythe program, including positioning on the screen and the birthcell list. Hence loading a dragon from disk can be followedimmediately by F1 which will draw it on the screen.

The next thing the program wants is the number of directions. This request is the number of cell orientations. Entering thenumber 4 means all cells are oriented in four directions, east,north, west, or south, as if reading a map. The program assumesthat all cells are single line segments oriented in one of fourdirections unless told otherwise by you or the input file. Inany case the program will display the DRAW commands it will use.Entering the DRAW commands wanted (followed by Return, ], or F1)changes the default value. Pressing ] following data entrydisplays what the program thinks you typed.

Following the number of directions request, QDRAGON.BAS wants themaximum cell division. This is so that the program can begin todimension the genetic code array. You type in this value if itdiffers from the displayed value (Return cycles forward throughdata entry). The genetic code requires two dimensions; so if F1is pressed now, all entries in the genetic code array will bezero, producing a dull dragon. The program redimensions thegenetic code array whenever one of its dimensions is changed.

Next, the program wants the total number of cell types. Thisnumber completes the dimension of the genetic code array. Theprogram displays, as always, what it thinks should be the numberof cell types. Typing Return accepts the program's choice anddisplays what the program wants next and the value it will use ifyou don't change it.

After typing Return, the program displays the DRAW commands itwill execute for the first cell. You should type Return to go onto the next program request or type in the DRAW commands you wantfor the first cell followed by Return to advance to the nextrequest or ] to edit or preview the previous request. If youwant a cell to be an invisible line segment, typing a dash willcause the program to record the appropriate DRAW commands, and ifyou want a 'do nothing' cell, typing * makes the program fill inDRAW commands that do the job.

Ending the entry with Return, the program will now exhibit thelabel of the first child of the first cell. Each cell dividesinto a number of cells, numbered from one to the number of cellsinto which the cell divides. A user entry here should be a celllabel, a number between 0 and one less than the total number ofcells. Typing Return causes the program to ask for the nextchild of the current cell. If the cell has fewer children thanthe maximum, the last child cell should be followed by a period.

Whenever the program asks you for the last child of a celllabelled a multiple of the number of directions, it permits youto end entry with an * to abort this feature. Without the *entry, the program will fill in child cells cyclically up to thenext cell labelled a multiple of the number of directions, anddisplay the draw code for the next cell which is a multiple ofthe number of directions.

After all cells and their children have been displayed, theprogram requests the number of cells in the birth cell list. Dragons can begin life as a single cell (number of cells in birthcell list, 1) or as several cells, each drawn in a differentcolor. Next the dragon's age in days is requested. Followingthis comes a request for cell length and the position on thescreen where drawing is to begin. The program draws the dragonstarting at this position.

Finally, the program asks if the dragon just drawn is to be savedon disk. If so, you type a name of up to 8 letters followed byReturn or ]. Only Ctrl-Break or illegal data entry ends theprogram.

QDRAGON.BAS displays DRAW commands instead of numbers; so ignoreinterpreter values in the table. The relation betweeninterpreter values in the table and the draw codes in the programis I->TA360I/DR. Invisible cells end in BR and 'do nothing'cells end in NBR.