The Electron becomes a brain-teasing machine with ALPHASWAP, a solo logic game from Peter Hart.
When you run the program the first sixteen letters of the alphabet are displayed - in order - on the screen.
Then the micro mixes them up, leaving you the job of getting them back to the original alphabet.
But it's not as easy as it might seem. To get them back into order you have to pick groups of four letters at a time and rotate them in an anticlockwise direction.
This is done by telling the Electron the top left letter of the four you want to move.
And that's all there is to it. The rules are simple - the game itself isn't!
If you fancy yourself as a mental athlete, then ALPHASWAP is the game for you.
||Programs function key 0 to play the game again
||Sets background colour to blue
||Defines a text window in which the Electron can comment on the player's actions
||Says goodbye to the flashing cursor!
||Sets the graphics operations such that any colour plotted will invert the colour already there. Since it is in Mode 4 (two colours), it will first plot the desired letter by inverting the background to the foreground colour. Then, by plotting the same letter in the same place, it will invert the colour back to the background colour, making it disappear
||Dimensions arrays to hold letters and their positions. R holds the rows, C the columns, L$ the present letters, F$ holds correct positions of letters for checking.
||Main program segment. Initialises arrays and sets up screen. It then muddles up the letters and enters the game loop which repeats until letters are correctly positioned.
||Gets a letter from the keyboard. *FX1,51 clears the buffer
||Joins text and graphics cursors. The first loop assigns a letter to each element of L$, and then repeats for each element of F$. G is the gap between each letter, with X, Y being the position of first letter plotted. The others are plotted relative to this (lines 420-480) and their positions are "remembered" with the arrays C and R.
||Moves the relevant four letters
||Plots these four letters
||Forms a delay, used throughout the program
||Gives introduction to game
||Steps letters anticlockwise by continually plotting and unplotting them
||Checks whether player has returned all letters to their original positions by comparing L$ and F$
||Plays a tune and congratulates player
||Muddles up letters, the amount of muddle depending on level chosen
||Decides whether letter is on the bottom or righthand edge
||Sets up sounds used throughout the program
||Gives player instructions and choice of difficulty
BREAKFREE, written by Jonathan Church, is an Electron version of the arcade classic, and it's a must for action game freaks.
With its 80-brick, multi-coloured advancing wall, changing ball speed, three levels of difficulty and constant onscreen scoring, it's enough to test anyone's wits and reflexes.
You control a yellow bar at the foot of the screen. A red ball darts around, bouncing off anything it encounters.
You must attempt to bounce the ball against every brick in the wall. Unfortunately, the ball does not always leave the wall at the same speed that it hit it, so you have to be able to react quickly.
You start the game with three bats but you get a bonus bat every time a wall is totally cleared, along with an extra 500 points and a small tune.
When a wall is cleared a new one will be built lower down the screen - giving you less time to manoeuvre your bat into a position where it is possible to hit the ball.
And to make things even more difficult the speed of the ball will increase.
Lives are lost when you fail to hit the ball with the bat. When all lives have been lost, you will be played the first few bars of the Death March.
If your score is high enough you will be asked to place your name in thie high score Hall of Fame table.
When the program starts you will be given some brief instructions which tell you what keys to press to move the bat, and how many points the different colours bricks score.
You will then be asked what sound options are required. There are four of these - total sound on, total sound off, game effects only and tunes only.
As well as being able to choose the sound at the start of the game it is also possible to change it during actual play by pressing the relative key - 1, 2, 3 or 4.
Then you will be asked for the ball speed - fast, medium or slow.
During play you can halt the action by pressing RETURN. The game will resume from where it stopped by pressing any other key.
The wall can be made to move further down when a screen is cleared by increasing the value of WA% in line 170.
By changing the string value of k% in line 1170 any keys can be used to move the bat left and right.
The initial speed of the ball can be increased by changing the value of bndelay% in line 2080. The smaller the value, the quicker the action.
Also the responsiveness of the bat can be altered by changing the values of the *FX calls in lines 830 and 840.
*FX11 sets the auto-repeate delay on the key, and *FX12 sets the period of auto-repeat.
For more information on these *FX calls, see Appendix D on page 281 of the ELECTRON USER MANUAL.
||The Ath high score
||Name of the Ath highest scorer
||Number of bricks left in wall
||Y coordinate of wall
||X coordinate of wall
||Amount to be added to Y coordinate of wall
||Colour of a row of bricks
||Volume of tunes
||Volume of sound effects
||Volume and envelope number of a sound statement
||Pitch of a note
||Duration of a note
||Contains the words GAME OVER
||One of characters of A$
||Position of character Z$ selected by MID$ in A$ and its colour
||X coordinate of ball
||Y coordinate of ball
||X coordinate of space which deletes ball
||Y coordinate of space which deletes ball
||Logical colour of poin the ball is travelling over
||X coordinate of bat
||Y coordinate of bat
||Number of bats left
||TRUE if ball is below the bat and FALSE if it is above it
||X direction of ball
||Y direction of ball
||The time the computer waits for you to press a key
|bdelay%, btime%, BTIME
||Delays to stop ball's speed increasing when bat is not being moved
||Produces high score table. Defines graphics and envelopes
||Switches cursor off and changes logical colour 3 to actual colour 6. Also sets number of bricks in wall, the score and number of bats left. Sets coordinates for bat and draws it, and redefines key auto-repeat
||Prints instructions. Sets initial speed of ball and sound options
||Sets coordiantes of ball and initial direction it will take. Also empties input buffer
||Checks whether necessary keys have been pressed to move bat. If they have, the bar is moved one position in correct direction. Also checks whether keys 1, 2, 3 or 4 have been pressed to change the sound options.
||Moves ball one position in correct direction. Checks whether ball has hit side of screen, or top or bottom of screen. Also checks whether ball has issed the bat or hit the wall
||Resets speed of ball and position of bat
||Increases speed of ball, checks wall is not too far down the screen, and that ball is not too fast. Also increases amount of bats by one and adds 500 points to score
||Checks whether ball has hit the bat
||Decides which direction ball will take after hitting the bat
||Changes direction of ball. Increases score and changes speed of ball if necessary