Brainteasers: Spot The Difference

By Genevieve Ludinski

Originally published in EUG #53

Introduction

Part two of EUG's series of utilities designed to stretch your brain into all manner of putty-like shapes presents another two of the same; once again with this accompanying article divulging their secrets. Brief instructions also appear on screen.

A-MAZE-ING

You are in the middle of a complicated maze, and your objective is to reach the outside in the quickest possible time, but also with the fewest number of moves possible.

Don't rush headlong into this one as a little forward planning can save you time and points.

Every step counts as a point and every time you try to cross a barrier counts as a point.

You must aim for the top right hand corner or the exit nearest to that one.

How to Play

You are represented by a dot in the lower left hand side of the maze, and you move by using the cursor keys.

Your score will be displayed at the top of the screen. The number of steps taken has a greater effect on your final score than the time factor.

You may, of course, retrace your steps and begin again from any point you wish to. When you have reached the outside, or you wish to give up, press the ESCAPE key.

We hope you make it, as there are plenty more 'Brainteasers' waiting for you on the outside.

Programming Hints

The maze is created of cells, each of which have one side blocked off. The cell shapes are drawn using VDU 23 to create user-defined graphics.

You could increase the size of the maze by changing 20 and 24 in lines 230 and 250. The maze shown is 24 columns wide by 20 rows. The maze shown is 24 columns wide by 20 rows. The maze array M% must be DIMensioned 1 column and 2 rows larger than the actual array to allow for checking the (X+1)th column and (Y+1)th row. If you want the array in the centre of the screen you should change the PRINT statements in lines 220 and 240.

The lines drawn down the side of the maze in lines 300 and 310 would have to be changed, so would the start position of the dot in lines 320 and 330. In a 20 row maze, the 21st row is the row the dot starts on, so special conditions apply to this row in lines 370 to 430. If a different number of rows is chosen this 21 must be changed.

SPOT THE DIFFERENCE

I suppose that this could have been called 'Stars And Stripes', the difference as you will see when you run this colourful eye test.

Two pictures, composed of stars and stripes, in red, white and blue appear on the screen, and you will be asked to identify which of the items is different.

How To Play

Items are keyed as follows:

Red Stripe = 1White Stripe = 2Blue Stripe = 3
Red Star = 4White Star = 5Blue Star = 6

Identify the differences and key in the number and press RETURN. If you are correct you will hear a high pitched tune, but if you are wrong your answer will be crossed.

To help you, numbers previously keyed in are displayed in brackets. When all the numbers required have been keyed in a further tune will be played. Just hope that it is high pitched for a correct answer.

To continue, or stop, press Y or N or RETURN.

At conclusion you will see your score sheet showing tries, correct answers and time/average taken.

Programming Hints

You might find the routine PROC_STAR useful in your non-commercial programs as it draws a star. You just have to specify the bottom left-hand corner of the star (X,Y), the width of the bottom of the star (W), the height of the star (H) and the colour that it is to be displayed in (CL).

You could make the puzzle easier by increasing the range of possible values for the shapes that are going to be different. The function FNM(MIN,MAX) is used to define the minimum and maximum value of any shape. Remember if you increase the MAX value you must reduce MIN by the same value, or the picture will extend beyond the allocated area.