SINCLAIR PROGRAMS, October 1984
===============================


FIRE CHIEF
----------
SAVE the children from the fire before the flames become too fierce. The
children will appear at the windows of the tower and you must race up and
down the fire engine ladder to reach them. Once you have lost your three
lives the building will crumble. Fire Chief was written for the 16K Spectrum
by Peter Glancy, aged 15, of Liberton, Edinburgh.


**********************************************************************


GOLD MAZE
---------
by Tim Smith
from Sinclair Programs, October 1984

ONE hundredth of the maze is shown in the centre of the screen. The exit is
not visible so you must work your way round the maze trying to escape. Gold
bars are scattered around the maze and these should be collected to gain
points. There is one setback which is that there are also several bars of
fools gold which cannot be distinguished from the real gold bars. If you
pick up a bar of fools gold it will reduce your score by five points. Ten
points can be gained for each bar of gold collected.

Gold Maze was written for the 48K Spectrum by 14 year old Tim Smith of
Doveridge, Derbyshire who took six hours to write the program.

Lines       Function
   1- 520 : Set-up Maze (SETUP)
 530- 700 : Prog Control (MAIN)
1000-1060 : Get "gold" (GOLD)
1500-1570 : Get "Fools Gold" (FOOL)
2000-2050 : End game on "exit" (EXIT)
2500-2560 : End game on "abort" (ABORT)
3000-3050 : Play "win tune" (TUNE 1)
            Play "lose tune" (TUNE2)
5000-5100 : Print logo (LOGO)
8000-8240 : Print Instructions (INSTRUCT)
9000-9070 : Save routine
9500-9510 : Load routine

Variables
a$(50,50) : Maze graphics
x,y       : Current coords.
a,b       : Previous coords.
g         : Score
d,p       : duration/pitch (for BEEP)

UDGs
ga        : Gold nugget
gb        : Fool's gold
go        : YOU
gd        : "WINDOW" SURROUND
ge-gl     : "GOLDMAZE"
gm,gn     : "EXIT"

Loop counters: a

How it works
The module names suggested in the program summary have been used to describe
how the program works. These names have no programming significance.

SETUP (Lines 1-520)
Set up maze in array a$, clear screen, set colours, call LOGO, call INSTRUCT.
Set score to ZERO. Initialise coords x,y to start at middle of maze.
LOGO (Lines 5000-5100)
Repeat. Play "Rich Man". Print title. Scan keyboard. Until Start Key. Return.
INSTRUCT (Lines 8000-8240)
Clear Screen. Print instructions. Clear screen. Clear screen. Print sample
maze "window". Clear screen. Print window surrounds and "black out" window.
MAIN (Lines 530-700)
Hold "old" x,y as a,b
x=x+(Key=a)(Key=q)
y=y+(Key=m)(Key=n)
IF Key=0 THEN call ABORT. IF a$ (x,y)=wall THEN re-set x,y to "old" values
(a,b). Print 5*5 character maze window initially aS (23-27,24-28). Print go
(YOU at window centre). IF a$(x,y)=gb (gold) THEN CALL GOLD. IF a$(x,y)=go
(fool's gold) THEN CALL FOOL. IF a$ (x,y)=gm or gn (exit found) THEN CALL
EXIT. Print Score. Jump to MAIN.
GOLD (Lines 1000-1060)
Print "GOLD" message (with BEEPS). Take nugget out of maze set a$(x,y)="".
Increase score. Erase "GOLD". Return.
FOOL (Lines 1500-1570)
Print "FOOLS GOLD!" (with BEEPS). Take nugget out of maze. Reduce score by 5.
Erase "FOOLS GOLD". RETURN.
EXIT (Lines 2000-2050)
Clear Screen. Print exit message/score. Call TUNE1. Repeat. Scan keyboard. IF
N pressed THEN stop until Y pressed RUN.
ABORT (Lines 2500-2560)
Clear screen. Print abort message/score. Call TUNE2. Repeat. Scan keyboard.
IF N pressed THEN stop until Y pressed RUN.

The main principle

The author has cleverly arranged the program only to allow the player a
"peep" at the maze through a 5 by 5 character "window" (showing only 1% of
total maze).

The first view is of the section of the maze array a$(x,y) with x from 23 to
27 and y from 24 to 28. This view (and all subsequent views) is repeatedly
printed by the loop around MAIN, until any of the control keys are pressed..
Direction keys, in effect, shift the window (not you) by 1 character
left/right or up/down for each pass through the MAIN loop.

Before the window can be shifted a check must be made to make sure that you
are not in a wall (line 560). If you are, then previous coordinates (for
central character of window, which is also where you are) are restored.
Otherwise, the shift is made, followed by checks on gold etc.


**********************************************************************


HIT STAR (aka. Head for the Stars)
--------
WAIT until a star is abdve your head and then jump at it. If you hit the beam
instead of the star you will lose the game. See how many stars you can hit
before you knock your head on the beam. Head for the Stars was written for
the 16K Spectrum by Emlyn Howell, aged 9, of Brighton, Sussex.


**********************************************************************


MR SOCKET
---------
BRICKS and light bulbs fall from the top of the screen and you must catch as
many as you can. If any of the objects touch the floor an uncrossable crater
will be left. It is possible, however, to use any bricks you have caught to
fill the holes. If a brick hits you anywhere other than on your hat you will
die. Mr Socket was written for the 16K Spectrum by John Hobdell, aged 14, of
Dursley, Gloucestershire.


**********************************************************************


SOLUTION (aka. Puzzle Solver)
--------
PUZZLE SOLVER is a useful program to help find the solutions to puzzles in
which you have to pick out words from amongst a group of letters in a grid.
Input the measurements of the grid, any size up to a maximum of thirty
letters across and twenty characters down, and then enter the letters on each
row. The information is shown in the grid and you can then enter a word for
the computer to find. The computer scans the grid and if a word cannot be
found, asks you to try again. Written for the 48K Spectrum by Christopher
Miles, aged 12, of Egham, Surrey.


**********************************************************************

