Classic Computer Magazine Archive PROGRAM LISTING: 84-02/ODDMAN4.LST


5 REM ���Ӡ�����͠���̠��Ԡ��Π�Π�����ή��Ԡ�Ӡ��Ԡ�Ơ�����ҭ��Ԡ�����Ӡ����Ġ�����Χ��Π��֮����ՠ��®�����
10 REM ****************************
20 REM *                          *
30 REM *       ODD MAN OUT        *
40 REM *            BY            *
50 REM *  JOHN AND MARY HARRISON  *
60 REM *                          *
70 REM *            FOR           *
80 REM *      ANTIC MAGAZINE      *
90 REM *                          *
95 REM ****************************
160 DIM FACE$(48)
600 FOR I=1 TO 48:READ X:FACE$(I,I)=CHR$(X):NEXT I
700 TRAP 720:OPEN #4,9,0,"D:RECORD.DAT":GOTO 760
720 REM TRAP ROUTINE IF RECORD.DAT DOES NOT EXIST
740 CLOSE #4:OPEN #4,8,0,"D:RECORD.DAT"
760 TRAP 40000
780 REM INPUT CHILD'S NAME
800 GRAPHICS 0:OPEN #5,4,0,"E:"
820 POSITION 2,5:? "Hello.  What is your name? ";:INPUT #5;NAME$
840 POSITION 2,7:? "Plug your joystick into port number 1 and press the fire button to begin."
860 IF STRIG(0)<>0 THEN 860
1070 FOR DEL=1 TO 25:NEXT DEL
1360 RAM$(209,256)=FACE$(1,48)
2860 POSITION INT(LE)*4+3+(CHOICE=7),8:? #6;"\"
2880 POSITION 9,1:? #6;":;"
2900 IF INT(LE)<>ODD THEN 3000
2920 POSITION 9,2:? #6;"<="
2940 FOR K=121 TO 0 STEP -5:SOUND 0,K,12,8:SOUND 1,K+5,12,8:NEXT K:SOUND 0,0,0,0:SOUND 1,0,0,0
2960 FOR DEL=1 TO 75:NEXT DEL
2980 POSITION 9,1:? #6;"  ":POSITION 9,2:? #6;"  ":? "}":RETURN 
3000 POSITION 9,2:? #6;">?"
3020 FOR K=1 TO 30:SOUND 0,60,12,7:SOUND 0,60,12,8:NEXT K:SOUND 0,0,0,0
3040 IF FLAG=0 THEN WRONG=WRONG+1:FLAG=1
3060 POSITION 9,1:? #6;"  ":POSITION 9,2:? #6;"  "
3080 POSITION INT(LE)*4+3+(CHOICE=7),8:? #6;"[":? "}":GOTO 2540
3100 REM REWARD ROUTINE
3120 POKE AF,0
3140 GRAPHICS 21:FOR I=0 TO 2:SETCOLOR I,4,6:NEXT I:SETCOLOR 4,7,0:C=1
3160 DISP$="YEAH":PYO=22:GOSUB 3760
3180 DISP$=NAME$:PYO=31:GOSUB 3760
3200 IF WRONG=0 THEN 3240
3220 DISP$="  RIGHT":DISP$(1,1)=STR$(10-WRONG):GOTO 3260
3240 DISP$="PERFECT"
3260 PYO=40:GOSUB 3760
3280 REM ROUTINE FOR ATLEAST 8 RIGHT
3300 IF WRONG>2 THEN 4060
3320 COLOR 1:PLOT 40,0:DRAWTO 40,10:PLOT 35,5:DRAWTO 45,5
3340 COLOR 2:PLOT 42,3:DRAWTO 38,7:PLOT 38,3:DRAWTO 42,7
3360 REM ROUTINE FOR ATLEAST 9 RIGHT
3380 IF WRONG>1 THEN 4060
3400 COLOR 1:PLOT 10,12:DRAWTO 20,12:PLOT 15,7:DRAWTO 15,17
3420 COLOR 2:PLOT 17,9:DRAWTO 13,15:PLOT 13,9:DRAWTO 17,15
3440 COLOR 1:PLOT 60,12:DRAWTO 70,12:PLOT 65,7:DRAWTO 65,17
3460 COLOR 2:PLOT 67,9:DRAWTO 63,15:PLOT 63,9:DRAWTO 67,15
3480 REM ROUTINE FOR 10 RIGHT
3500 IF WRONG>0 THEN 4060
3520 SETCOLOR 2,3,4:COLOR 3
3540 FOR LP=1 TO 15:X=INT(80*RND(0)):Y=INT(20*RND(0))
3560 GOSUB 3940:PLOT X,Y:NEXT LP
3580 REM SOUND EFFECTS FOR PERFECT SCORE
3600 LO=50
3620 FOR I=1 TO 20:FOR J=0 TO 13
3640 SETCOLOR 0,J,8
3660 SETCOLOR 1,J+1,8
3680 SETCOLOR 2,J+2,8
3700 SOUND 0,LO,10,14:LO=LO-1:IF LO<35 THEN LO=50
3720 NEXT J:NEXT I:SOUND 0,0,0,0
3740 GOTO 4060
3760 PXO=(80-LEN(DISP$)*10)/2:PX=PXO:C=1:COLOR C
3780 FOR I=1 TO LEN(DISP$):PY=PYO
3800 CHAR=ASC(DISP$(I,I))-32:PTR=CHAR*8+1
3820 FOR J=PTR TO PTR+7:BITM=ASC(ROM$(J,J)):DIV=128
3840 FOR K=1 TO 8
3860 IF BITM/DIV>=1 THEN PLOT PX,PY:BITM=BITM-DIV
3880 DIV=DIV/2:PX=PX+1:NEXT K:PX=PXO:PY=PY+1
3900 C=3-C
3920 COLOR C:NEXT J:PXO=PXO+10:PY=14:COLOR 1:NEXT I:RETURN 
3940 REM EXPLOSION SOUND
3960 SOUND 2,75,8,15:V1=15:V2=15:V3=15:ICR=0.079
3980 SOUND 0,20,8,V1:SOUND 1,40,8,V2:SOUND 2,70,8,V3
4000 V1=V1*ICR:V2=V2*(ICR+0.05):V3=V3*(ICR+0.08)
4020 IF V3>1 THEN 3980
4040 SOUND 0,0,0,0:SOUND 1,0,0,0:SOUND 2,0,0,0:RETURN 
4060 REM CONDUCT RECORD KEEPING AND LOOK FOR JOYSTICK INPUT TO CONTINUE
4080 ? #4;NAME$:? #4;CHOICE:? #4;10-WRONG
4100 IF STRIG(0)<>0 THEN 4100
4120 GOTO 880
4140 GRAPHICS 0:CLOSE #4:END 
4160 REM 
4500 DATA 0,7,24,32,76,76,64,64
4520 DATA 0,224,24,4,50,50,2,2
4540 DATA 64,72,68,67,32,24,7,0
4560 DATA 2,10,18,226,4,24,224,0
4580 DATA 64,67,68,70,32,24,7,0
4600 DATA 2,194,34,18,4,24,224,0

Back to previous page