Letter Scramble

Author(s): Basil Wentworth
Publication: SyncWare News
Pub Details: SyncWare News v5 n5 (Volume 5, Issue 5)
Date: May/June 1988
Pages: 23

This is a little game that challenges the player’s ability to analyze patterns. The LISTing given is for TS2068; the modifications necessary for the TS1000 are given in the text.

Don’t panic. I’m not getting more fickle in my old age. “Joey” is a name that Jocelyn’s family inflicted on her when she was very young, and she hasn’t ever been able to shake it entirely. And this game needs a four-letter name, as you will see.

Actually, it needs three words–two of five letters each, and one of four letters. So the text could have been

GAMES
ZX81
PLAYS

It doesn’t matter in what order the words occur. In fact, Jocelyn insists on interpreting this game as JOEY LOVES BASIL. I don’t mind.

I’ve seen “hardware” analogs of this game for sale in drug stores. A little matrix holding a number of square tiles, which are free to slide left and right, up and down. And one square vacant, to allow maneuvering room. The trick is to slide them around so that they are in some specified order–whether to make a map of Europe, or an alphabet, or whatever.

When you RUN the program, the TS2068 gives you a courtesy message while the text is being arranged in random order. I haven’t been able to get this effect on the TS1000, due to the blanking of screen while it is calculating. But the delay is only about 10 seconds, anyway.

When the randomizing process is complete, the scrambled text is displayed, as shown in the illustration. Pressing UNSHIFTED 5 through 8 makes the asterisk move in the direction of the respective keyboard arrow, changing places with its neighboring text. Unless the asterisk would move “off scale” as a result, in which case a warning message is displayed, and the command is otherwise ignored.

The text to be used is entered as A$ at the beginning of the program, with no spaces, and with an asterisk appearing as the last (15th) character. The program is straightforward from there.

It would have been possible to simplify the program a bit, except that I wanted to keep the programs for the two computers identical, as far as possible. However, anyone wanting to improve on the program is certainly welcome to do so. I’d like your comments.

The changes to be made for the TS1000 are as follows:

Add

  5 FAST
175 SLOW
205 FAST

Change the 1000 section to read

1000 SLOW
1005 FOR F=1 TO 3
1010 FOR G=1 TO 10
1015 NEXT G
1020 PRINT AT 20,0;" sorry--illegal move " (INVERSE text)
1030 FOR G=1 TO 10
1035 NEXT G
1040 PRINT AT 20,0;" SORRY--ILLEGAL MOVE "
1050 NEXT F
1055 FAST
1060 GOTO 170

And the SAVE section:

9010 SAVE "BLJ"
9020 RUN

The do-nothing loops at lines 1010-1015 and 1030-1035 are delays, to give the error message time to register. And the outer loop, from 1005 to 1050, give more or less the same effect as the FLASH operation on the TS2068.

  10 LET A$="BASILLOVESJOEY*"
20 DIM B$(15)
30 CLS
40 PRINT AT 3,5;"BE WITH YOU IN A MOMENT"
50 FOR F=1 TO 15
60 LET N=INT (15*RND+1)
70 IF B$(N)<>" " THEN GO TO 60
80 LET B$(N)=A$(F)
100 NEXT F
110 CLS
120 FOR F=1 TO 5
130 PRINT AT 5,3*F;B$(F)
140 PRINT AT 8,3*F;B$(F+5)
150 PRINT AT 11,3*F;B$(F+10)
160 NEXT F
170 PRINT AT 20,0;"UNSHIFTED 5-8 MOVE STAR"
180 IF INKEY$<>"" THEN GO TO 180
190 IF INKEY$="" THEN GO TO 190
200 IF INKEY$<>"5" AND INKEY$<>"6" AND INKEY$<>"7" AND INKEY$<>"8" THEN GO TO 180
210 GO TO 100*VAL INKEY$
500 IF N=1 OR N=6 OR N=11 THEN GO TO 1000
510 LET B$(N)=B$(N-1)
520 LET B$(N-1)="*"
530 LET N=N-1
590 GO TO 110
600 IF N>10 THEN GO TO 1000
610 LET B$(N)=B$(N+5)
620 LET B$(N+5)="*"
630 LET N=N+5
690 GO TO 110
700 IF N<6 THEN GO TO 1000
710 LET B$(N)=B$(N-5)
720 LET B$(N-5)="*"
730 LET N=N-5
790 GO TO 110
800 IF N=5 OR N=10 OR N=15 THEN GO TO 1000
810 LET B$(N)=B$(N+1)
820 LET B$(N+1)="*"
830 LET N=N+1
890 GO TO 110
1010 PRINT AT 20,0; FLASH 1;" SORRY--ILLEGAL MOVE "
1015 FOR G=1 TO 300: NEXT G
1060 GO TO 170
8999 STOP
9000 REM SAVE
9010 SAVE "BLJ" LINE 1
9020 BEEP .3,12: BEEP 1,12
9030 CLS : PRINT '''" RE-RUN TAPE TO VERIFY "
9040 VERIFY "BLJ"
9050 CLS : PRINT ''''" VERIFY OK"
9060 BEEP .3,16: BEEP 1,16

TS2068 BASIL LOVES JOEY

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.