Brainteasers: Wire Maze

By Genevieve Ludinski

Originally published in EUG #60

First there was Don't Paint The Cat, now there's Don't Paint The Bird (Alias Statspainter). It begs the question of how many more family pets will Genevieve Ludinksi tempt us to paint before this series of taxing puzzles comes to its close? In addition to this redecorating frenzy, part nine presents a very simple wire-puzzle...

WIRE MAZE

Well at last you have your own robot to cut the grass, clean the car, wash the windows and take the dog for a walk. There is one snag though.

Your robot has been wired up incorrectly. It must have been Friday afternoon when the other robots put your model together. At the moment, if you press the arm-control button, the robot's legs move. You, I'm afraid, are going to have to rewire your new family friend.

How To Play

This program takes a while to begin as the robot, complete with wires and buttons, needs to be plotted. Control buttons are:

Red ......1
Yellow......2
White ......3

At the top of the screen will appear the word "Head" and the three colour buttons. You must decide which of these buttons is connected to the head and press the corresponding number key and RETURN. One wrong try means you must try again, and a subsequent wrong guess will cause your computer to give you the correct answer. If you think about it, if you have guessed two wrong from three, you should know the answer by then anyway!

You continue for the arms and legs.

To play again, with a different maze, re-run the program.

Programming Hints

The useful BLOCK procedure is used which draws a rectangle of a specified size at a specified place. The rectangle is created by drawing two right-angled triangles joined together. Each triangle is drawn by MOVEing to a point then drawing a line from this point to a third point. If PLOT 85 is used to draw this line from the second point then a filled in triangle is created. You could use this procedure in any of your own non-commercial programs. Copy in the procedure DEF PROC_BLOCK(X,Y,W,H) and call it with PROC_BLOCK (followed by the X and Y position of its bottom left hand corner followed by its width and height all separated by commas.

The other thing about the program that you might find useful, is the way it draws the maze without you seeing it. This is done by using the VDU 19 command to change all red (1), yellow (2) and green (3) pictures to black (0), The maze is then drawn. Then another set of VDU 19 commands changes them all back to their original colours. The colour numbers are not the same as the second number is the logical colour number; the colour numbering system that is applicable to all modes.

You might find the wire maze too easy. It can be made more difficult by increasing the length of each wire by increasing the larger number in line 420.

STATSPAINTER

You are the director of Rockets Unlimited, and yesterday you were very pleased in the way the company was going. Then these officious accountants came, studied the figures and reckoned you were making a loss.

All weekend the sales figures are preying on your mind. Even while you are painting the fence you are trying to find out where the accountants went wrong. Sometimes you get so lost in thought that you end up painting the bird on the fence. If you do, it chirps in disapproval. If you can work accurately and quickly, you will find out where the accountants went wrong, and you will be able to prove to them that Rockets Unlimited is the success you always knew it was.

How To Play

The questions are on the modes and medians of a given set of numbers. The mode of a set of numbers is the number occurring most frequently. The median of a set of numbers is the middle number. The numbers are arranged in ascending order. Just key in the answer without pressing RETURN.

If you're right you may move on to the next question by pressing RETURN. If you are wrong, or take too long to answer, the bird ends up by getting painted. After nine consecutive correct answers you find out where the accountants went wrong.

Programming Hints

You can make the program easier by allowing more time to answer each question. To do this increase the 30 in line 250.

If you wish to use the graphics but to set different types of questions, replace procedures PROC_STAT, PROC_MODE and PROC_MEDIAN. Assign the question to Q$, the answer to A$ and the hint to H$. Questions in this program must have answers one digit or letter long. This could be changed though by changing the input routine at line 250.