Compucolor.org – Virtual Media

Listing of file='CONCEN.BAS;01' on disk='vmedia/trader-sector.ccvf'

100 REM Y ******************************************************
110 REM CONCENTRATION 01/01/81, FOR 3650/9650 SERIES BY GAB
120 REM COPYRIGHT (C) 1981 BY INTELLIGENT SYSTEMS CORP.
140 OUT 8,207:REM ENABLE KEYBOARD
150 CLEAR 5
160 SQ= 15:DL= 1
170 DIM R(SQ),V(SQ),S(1),G(1)
180 DEF FN R(X)= INT (X* RND (1)+ 1)
190 GOSUB 740
200 GOSUB 340
210 PL= FN R(2)- 1
220 PL= 1- PL
230 IF M> SQTHEN 330
240 GOSUB 620
250 IF V(G(0))+ V(G(1))= TTHEN 300
260 S(PL)= S(PL)- 1:GOSUB 510
270 PLOT 6,5,3,28,28:PRINT "NO MATCH":GOSUB 600
280 GOSUB 570:GOSUB 580
290 GOTO 220
300 S(PL)= S(PL)+ 2:GOSUB 510
310 PLOT 6,6,3,30,28:PRINT "MATCH":GOSUB 600
320 M= M+ 2:GOSUB 560:GOSUB 580:GOTO 230
330 GOTO 200
340 M= 0
350 PLOT 7,6,6,3,9,28:INPUT "TO START, SELECT A NUMBER FROM 2 TO 999: ";A$
360 IF VAL (A$)< 2OR VAL (A$)> 999THEN LOAD "MENU":RUN
370 T= INT (VAL (A$)):IF T< 2OR T> 999THEN GOSUB 610:GOTO 350
380 GOSUB 400:GOSUB 520
390 RETURN
400 PLOT 6,0,12,14,6,32
410 FOR I= 0TO 16STEP 2:PLOT 3,13,I:PRINT SPC( 38)"":NEXT
420 FOR Z= 0TO SQ:GOSUB 470:NEXT
430 PLOT 6,2,3,27,18:PRINT "SUM TO"T
440 FOR P= 0TO 1:Q= 44* P:PLOT 17+ P,3,Q,20:PRINT "PLAYER"P+ 1"  SCORE "S(P)
450 FOR S= 1TO 2:PLOT 3,Q,20+ S+ S:PRINT "SELECTION"S":":NEXT :NEXT
460 RETURN
470 GOSUB 500:PLOT 6,52:PRINT "   "CHR$ (65+ Z)"   ":RETURN
480 GOSUB 500:PLOT 6,11:A$= STR$ (V(Z)):A= LEN (A$)
490 PRINT SPC( (7- A)/ 2);A$;SPC( (8- A)/ 2)"":RETURN
500 PLOT 3,15+ 9* (3AND Z),2+ (12AND Z):RETURN
510 FOR P= 0TO 1:PLOT 6,1+ P,3,16+ 44* P,20:PRINT S(P):NEXT :RETURN
520 FOR I= 0TO SQ:R(I)= I:NEXT
530 FOR I= SQTO 1STEP - 1:J= FN R(I+ 1)- 1:K= R(I):R(I)= R(J):R(J)= K:NEXT
540 FOR I= 0TO INT (SQ/ 2):J= FN R(T+ 1)- 1:V(R(I))= J:V(R(SQ- I))= T- J:NEXT
550 RETURN
560 FOR S= 0TO 1:V(G(S))= - 1:NEXT :RETURN
570 FOR S= 0TO 1:Z= G(S):GOSUB 470:NEXT :RETURN
580 FOR S= 0TO 1:GOSUB 590:NEXT :RETURN
590 PLOT 6,7,3,13+ 44* PL,22+ S+ S:PRINT SPC( 5)"":RETURN
600 FOR D= 1TO DL* 500:NEXT
610 PLOT 6,0,3,0,28:PRINT SPC( 63)"":RETURN
620 G(1)= - 1:FOR S= 0TO 1
630 PLOT 7,6,7,3,13+ 44* PL,22+ S+ S:INPUT "";A$:IF A$< > ""THEN Z= ASC (MID$ (A$,1,1))- 65
640 IF Z> = 0AND Z< = SQTHEN 670
650 PLOT 6,5,3,19,28:PRINT "ENTER A LETTER FROM A TO "CHR$ (65+ SQ)
660 GOSUB 600:GOSUB 590:GOTO 630
670 IF V(Z)> = 0THEN 700
680 PLOT 6,3,3,19,28:PRINT CHR$ (65+ Z)" HAS ALREADY BEEN MATCHED"
690 GOTO 660
700 IF Z< > G(1- S)THEN 720
710 PLOT 6,5,3,24,28:PRINT "YOU JUST CHOSE "CHR$ (65+ Z):GOTO 660
720 G(S)= Z:GOSUB 480
730 NEXT :RETURN
740 PLOT 6,6,12,14,3,23,10:PRINT "CONCENTRATION":RETURN