Electron User 4.01 ================== Maths Fun --------- MATHS FUN is a short and simple program to test youngsters' mental arithmetic. There is a choice of four types of question: addition, subtraction, multiplication and division. There are also four levels of difficulty, ranging from very easy to quite hard, so you should be able to find a level to suit most children. There are 10 questions to answer and you are allowed three attempts at each. If you answer correctly first time you are awarded 10 points. Six points are awarded for a correct answer on the second attempt and two for the third. If you don't know the answer you'll be told after three attempts. After answering all 10 questions you'll be informed of your percentage score for the test. You can abandon a test at any time and return to the main menu by pressing ESCAPE. You can then select a different class of question. Variables type$ Multiplication, addition, subtraction or division level Skill level - 1 to 4 question Loop counter for 10 questions points Points awarded for each answer score Total score so far question$ The question num1 First number of question num2 Second number of question ans Correct answer answer$ Inputted answer  Procedures instr Prints instructions double(word$,x,y) Prints word$ in double height at x,y space(x,y,col) Waits for spacebar to be pressed error Reruns game if ESCAPE has been pressed, or prints error message levels Gets level and type of question questions Prints questions and checks answers, prints current score numbers Sets numbers for questionsCROSSWORD CROSSWORD consists of two programs, SETTER and SOLVER. The first can be used to create a grid for a puzzle of your own design, along with suitable clues. This can then be saved as a file and loaded into SOLVER which, as its name suggests, is an on-screen aid to working out the answers. On entering SETTER the first decision is whether to load a previously saved crossword file or to create a new one. Any file loaded must have been originally created using SETTER. Type the filename when asked and press RETURN. The data will be loaded in similar fashion to a Basic program and the name must conform to the general filename rules. To create a puzzle from scratch the first piece of information required is the size of the crossword grid. The minimum size is two squares by two and the maximum 14 by 14, although a perfectly square grid is not compulsory. When the prompt "Across =" appears, type the number of squares equal to the grid width and after the prompt "Down =" the number of squares equal to the grid height pressing RETURN after each. If the figures given are out of range RETURN will be ignored and you will be forced to use the DELETE key. When prompted "Satisfied (Y/N)" press Y to continue and N or any other character to cancel and re-enter. A crossword grid will be drawn in accordance with the parameters and filled with filler squares. Letters are printed both underneath and down the lefthand side of the grid, but these need not concern you for the moment. We'll return to them later. On the prompt "Build crossword now" design the grid which need not be the symmetrical design of most professional ones. The keys used are shown below. Key Action Letters A to Z Prints that letter in the grid at the cursor position overwriting what is already there. The cursor will skip one square if it is not at the edge of the grid. Lower case letters will be changed to capitals. SPACE As above except prints filler square. Cursor keys The cursor inverts the contents of the square in which it is present. It is made to skip one square in the direction of the cursor arrow and cannot be forced off the grid. CTRL-A After a letter is typed the cursor skips one square right if it is not already at the extreme right of the grid - default. A half arrow beside the grid always points in the skip direction. CTRL-D After a letter is typed the cursor skips one square down if it is not already at the bottom of the grid. If the direction of skip is changed the half arrow will be repositioned. CTRL-F Enter this when the design is complete.The control keys for the check routine are as follows: Key Action CTRL-F Quit this section RETURN Show next clue. If last, show first clue again. CTRL-R Redo clue showing. Enter new clue as before.When CTRL-F is typed, the computer counts the number of clues required both across and down. If either of these figures is zero, you will be sent, accompanied by a raspberry to the start menu. Another error causing a rude interruption at this point might be an isolated letter. It would be a strange crossword indeed with single letters scattered around and it would also cause havoc in the solving program. However you are allowed to build two or more crosswords separately in the same grid. Again strange, but this time acceptable. If the Electron is satisfied that both the above rules have been satisfied it will highlight the entries one by one and request a clue for each. Any character may be typed for a clue, but there must be at least one which is not a space and no more than 114 characters in all. Press RETURN when satisfied with each clue. Before doing so press CTRL-W, which is more important than first appears. It is assumed that the clue just typed is one long chunk of text and that the end of a line is not to be taken as the end of a word. After CTRL-W the line will be organised - it may be all right as it stands - so that no words are split between lines. The end of a line is now taken to be the end of a word and in the print option it will be. If there are odd spaces in the printer output of the clues the blame probably lies in failure to press CTRL-W at the clue entry stage. When all the clues are entered, or alternatively after a file has been loaded, a second menu is presented. It has the following four options: EXIT: The program is terminated SAVE: Crossword information is stored on tape or disc. For this purpose a name is required to identify it, which must consist of between one and seven characters. Type the name and press RETURN. The process then continues as for recording a Basic program. PRINT: First select whether the crowssword is to be printed with the answers still in place or with only filler squares. Press Y for the latter. Ready the printer, press RETURN and then wait. CHECK: The three main keys available here are those referred to earlier.Finally a note on how the clue lettering system words. Each clue is represented by a capital and a lower case letter. The capital precedes the lower case for an across clue, and the lower case the capital for a down clue - for example, Aa or bG. Each row and column of the crossword has been given a letter which is printed outside the grid. Rows have capitals and columns lower case letters. Look at the first letter of the required clue's answer and note its row and column. Follow that row across to obtain the capital and that column down to obtain the lower case letter. These letters label the clue. To use SOLVER, select a crossword saved from SETTER, type its name when asked and press RETURN. The data will be loaded in similar fashion to a Basic program. A grid is printed according to the parameters input and you can try out your answers by moving the cursor to the appropriate place on the grid and then typing them in. The keys used are shown below: Key Action CTRL-F Checks whether the crossword is complete. ESCAPE Prints answers for baffled solver. Cursor keys The cursor, an open square box, is manipulated by these keys in the direction of the key's arrow. It cannot be forced off the grid. CTRL-A After a letter is typed, the cursor will skip one square right if it is not already at the extreme right of the grid - default. CTRL-D After a letter is typed, the cursor will skip one square down if it is not already at the bottom of the grid. Letters A to Z Prints that letter in the grid at the cursor position overwriting what is already there - except over filler squares where nothing happens. The cursor will skip according to CTRL-A or CTRL-D. Small letters will be changed to capitals before entry on to the grid. CTRL-Cursor Manoeuvres the down clues in the right-hand text window. SHIFT-Cursor Manoeuvres the down clues in the left-hand text window. The Electron does not continually check for a completed crossword, so it is important to press CTRL-F if you think it complete. The correspondence of a clue to the grid is given by the clue letters. See SETTER's instructions for an explanation of the clue letter system. RATCATCHER A number of readers have asked for shorter listings, being not too keen on a long typing session. So here is RAT CATCHER, a reasonably short program that nevertheless has quite a lot going on within it. It requires a certain amount of quick thinking and skill, and offers a challenge to reach really high scores. Players take the part of the local rat catcher trying to quell a rat population explosion. The game starts off gently but as higher levels are reached, the rats start to breed with increasing rapidity. A bonus is set at the start of each level and decreases as time passes. If the bonus reaches zero, the game is over and you are shown your score and the current best score. Ten points are awarded for each rat caught and when all are eliminated in one level you move on to the next. Full instructions are given in the program. Remember - the bonus starts decreasing as soon as you press the Spacebar to start each level, so be prepared. Game Controls: Z - Left, X - Right, * - Up, ? - Down, RETURN - Jump Variables X%, Y% Coordinates of rat catcher X,Y Rat coordinates sc% Score r% Loop number to determine how often to print a rat sk% Skill level rl% Number of rats still to be caught bon% Bonus  Procedures chars Defines characters init Sets initial variables and sound envelopes set up Designs and displays screen layout key Checks for key press, acts accordingly jump Relocates rat catcher in opposite room left Moves left, tests for collision right Moves right, tests for collision up Moves up, tests for collision down Moves down, tests for collision rats Places rats at random. Number of rats depends on skill level kill rats Updates score and produces a sound to indicate rat caught next level Adds remaining bonus to score and advances skill level end Displays final score best score Displays best score so far, offers new game inst Prints instructions