EUG PD


Brainteasers 08

 
Published in EUG #59

Introduction

This issue's tough Brainteasers are for all the mathematicians out there who love mighty mental challenges. The program code is actually rather simple and, as usual, each is headed up by brief instructions on how to play on screen. The concepts involved, on the other hand, are taxing and will probably leave quite a few of you scratching your heads!

Concentration Test

This time we have given you a little longer to work out your answer, because we think you'll need all the brainpower at your command.

On the screen will be displayed 23 rows of 35 numbers and you have eight minutes to find as many pairs of adjacent numbers, whose sum is 10, as possible.

These pairs must be in the same row.

How To Play

When you have found the matching pairs, key in the row number followed by the column number of each, and then press RETURN. For example:

A3,A4

Always place a comma between each entry. If your pair of numbers is correct they will be highlighted on the screen.

You may key in the pairs in any order and, if you cannot find any more 'missing' pairs before your time is up, type in NO,MORE (RETURN). Again, there must be a comma between the words.

This ending of the game will cause your score sheet to be displayed. If you fial to complete in the alloted time, the score sheet will automatically appear.

Your score sheet will give a classification and an IQ rating on your powers of concentration.

Programming Hints

Lines 100-230 draw out the matrix of numbers and the row and column labels. Note that the letters are displayed in a loop by referring to their ASCII values. As the letter A has ASCII value of 65, B has a value of 66 etc so CHR$(64+J) where J is 1,2,3,etc. will display the letters A,B,C etc.

I would not advise any alterations as the scoring and IQ levels were determined by scientific testing, and any changes would make the scores and IQ level incorrect.

Sequence Countdown

Six numbers, or letters will be displayed on the screen and it is up to you to provide the next logical item to complete the series.

How To Play

When you have worked out your answer, type in your item and press RETURN.

If you cannot work out the correct answer, then move on as quickly as possible as you only have 200 seconds to complete as many answers as you can.

A wrong answer will bring you the correct result from your computer, and then you will be handed back to the next sequence. If you wish to "pass" on a question then type P and RETURN and you will be taken on to the next question.

After 200 seconds your score sheet will be displayed showing the number of sequences tried, correct answers, your time and your IQ level for adaptability.

Programming Hints

This program has a useful facility that enables the time to be constantly displayed in seconds. This actually only occurs while the program is waiting for the player to key in something, but as most of any program's time is taken up with waiting, this is all that is required. The lines 330 and 340 perform this function. In line 330 the time is printed out until the first character is keyed in. Then in line 340 subsequent characters are accepted until RETURN is pressed. The RETURN key has an ASCII value of 13, so is represented by CHR$(13).

One change you could make is to add new sequences. To do this, allow W to have a larger maximum value in line 170. The sequence must then be defined after line 210. The sequence is held in S(2), S(3), S(4), S(5), S(6), S(7) and S(8). S(2) is defined in line 150 and is fixed for all sequences. IC is another random value which may be useful when defining a sequence. The message saying how the sequence is created is held in MS$. If the last number in sequence S(8) is less than 26 then the sequence is converted to letters.

Genevieve Ludinski