DON'T PAINT THE CAT


Seems a strange title for a program. I mean, who would want to emulsion paint the family mogg anyway?

Well you see, the family have decided that you have to paint the garden fence. You lost the draw - it might have been your sister instead who had to do it, but never mind there is always next time. Across the fence from you and your fantastic paint brush, is your neighbour's transistor. As a mental challenge you have decided to paint the fence according to the high/low pitch of your neighbour's music.

Look out for your cat, it's parked at the end of the fence.


How to play

As the game begins you will hear just two notes to compare but, everytime you get the answer correct the next tune will have an extra note.

You will be told which two notes to compare, and you must key in H or L for High or Low.

If you get it wrong you must wait for the fence, and the poor old pussy, to be painted.

If you take too long to answer, the cat will wind up getting covered in paint anyway.

Press the RETURN key when you want a new tune.

Programming hints

If you can work out the answer long before the cat is painted, then reduce the 50 if INKEY$(50) in line 540.

If you find that it is too difficult to tell the difference between notes, then increase the 5 after the '*' sign in line 470.

Alternateively you can increase the time allowed to answer, or reduce the difference between the notes, by doing the opposite of what is described above.



   10 REM DON'T PAINT THE CAT!
   20 REM COPYRIGHT (C) G.LUDINSKI 1983
   30 MODE 5
   40 DIM N(10)
   50 CLS
   60 VDU 19,0,4,0,0,0,19,2,2,0,0,0
   70 GOTO 170
   80 REM
   90 REM U.D.G. CALCULATOR
  100 REM
  110 DEF FNB(N$)
  120 TF=0
  130 FOR L=0 TO 7
  140   TF=TF+(2^L)*VAL(MID$(N$,8-L,1))
  150   NEXT L
  160 =TF
  170 REM
  180 REM CAT SHAPE
  190 REM
  200  VDU 23,224,FNB("01010000"),FNB("0
11110000"),FNB("01110000"),FNB("1111100"
),FNB("11111000"),FNB("11111000"),255,FN
B("10001000")
  210 REM
  220 REM DRAW FENCE
  230 REM
  240 FOR J=2 TO 9
  250   COLOUR 128:CLS
  260   GCOL 0,2:PROC_BLOCK(0,0,1280,450
)
  270     GCOL0,3
  280     FOR I=0 TO 1000 STEP 100
  290         PROC_BLOCK(I,400,50,600)
  300       NEXT I
  310     PROC_BLOCK(0,500,1050,50):PROC
_BLOCK(0,850,1050,50)
  320     COLOUR3:COLOUR130:PRINTTAB(18,
19);CHR$(128)
  330     COLOUR3:COLOUR130
  340     W1=RND(J):W2=RND(J):IF W1=W2 T
HEN 340
  350     T1$="th":TS$="th":IF W1=1 THEN
 T1$="st"
  360     T2$="th":IF W2=1 THEN T2$="st"
  370     IF W1=2 THEN T1$="nd"
  380     IF W2=2 THEN T2$="nd"
  390     IF W1=3 THEN T1$="rd"
  400     IF W2=3 THEN T2$="rd"
  410     PRINTTAB(0,21)"Is the ";W1;T1$
;" note in  the tune higher or  lower th
an the ";W2;T2$;"  note."''"Press H or L
 ";
  420     N(0)=0
  430     FOR K=1 TO J
  440     REM
  450     REM PLAY THE TUNE
  460     REM
  470         N(K)=INT(RND(5)*5+50):IF N
(K)=N(K-1) THEN 470
  480         IF J=2 AND N(1)=N(2) THEN 
GOTO 470
  490         SOUND 1,-15,N(K),10:SOUND 
1,0,0,1
  500       NEXT K
  510     IF N(W1)>N(W2) THEN A$="H"
  520     IF N(W1)<N(W2) THEN A$="L"
  530     GCOL 0,1:I=-100:I$="":ID=0
  540     I$=INKEY$(50):IF I$="" OR ID=1
 THEN I=I+100:PROC_BLOCK(I,400,50,600):I
F I<1000 THEN 540
  550     IF I$=A$ AND ID=0 THEN PRINT''
"Yes, you're right":GOTO600
  560     IF I<1000 THEN PRINT I$;:ID=1:
GOTO540
  570     COLOUR1:PRINTTAB(18,19);CHR$(1
28):SOUND1,-1,80,1:SOUND0,-15,7,20:COLOU
R3
  580     IF A$="H" THEN PRINTTAB(0,28)"
No, it's higher (H)"
  590     IF A$="L" THEN PRINTTAB(0,28)"
No, it's lower (L)"
  600   COLOUR3:PRINTTAB(0,30)"Hit RETUR
N for more";:INPUT RB$
  610   IF I$ <> A$ THEN GOTO 250
  620   NEXT J
  630 PRINTTAB(0,27)"A musician like    
 yourself shouldn't  be painting fences!
":GOTO 700
  640 REM
  650 DEFPROC_BLOCK(X,Y,W,H)
  660 MOVE X,Y:MOVE X+W,Y
  670 PLOT 85,X,Y+H
  680 PLOT 85,X+W,Y+H
  690 ENDPROC
  700 END