image of READY prompt

Wang2200.org

Listing of file='WORDOVP' on disk='vmedia/games-droz01.wvd.zip'

# Sector 813, program filename = 'WORDOVP'
0010 REM WORDOVP - D. Angel - 1/17/80
0020 GOTO 8000
0030 COM A$(13)6,A(6,8),A0(5),B(8),Z8$64,Z9$64,R,U
   : DIM N$39,K$1,B$(1)2,T$28,M$26,M1$26,W$11,W0(10),W$(8,10)11,W(8),X6$1,P$10
     ,X,P$(16)1,B$2,P0
0035 DIM @T,@T$28,@P$(16)1,@N$(16)20,@S(16),@V$(16)1,@P9,@F$(16)1
0040 DIM M$(2)26
0050 REM %WORD ENTRY ROUTINE
0060 DEFFN'8
   : PRINT HEX(0D03);
   : REM SPECIAL TEST ENTRY POINT
0070 J=0
   : W$=" "
   : M$=T$
   : PRINT AT(X3,0);"TYPE";TAB(24);"Letters available";HEX(0D0A0A);TAB(60);
0080 PRINT HEX(060D);W$;HEX(0D);STR(Z9$,,21);STR(M$);HEX(0D);STR(Z9$,,J+1);HEX
     (05);
   : GOTO 90
0085 PRINT HEX(07);
0090 @T=@T-U
   : KEYIN K$,140,95
   : IF @T<0 THEN 260
   : IF T<=@TTHEN 90
   : T=INT(@T)
   : PRINT HEX(060D);STR(Z9$,,50);T;"  ";
   : IF @F$(#PART)<>" "THEN GOSUB 370
   : GOTO 80
   : REM %S.F. KEYS
0095 ON POS(HEX(00047E7F05)=K$)GOTO 260,100,100,100,240
   : GOTO 90
   : REM %SCRAMBLE
0100 PRINT HEX(0D);TAB(J);
   : M1$=T$
   : M$,W$=" "
   : J2,J=0
0110 IF M1$=" "THEN 80
   : I=2+2*INT(13*RND(1))
   : IF STR(M1$,I,1)=" "THEN 110
0120 J2=J2+2
   : STR(M$,J2,1)=STR(M1$,I)
   : STR(M1$,I,1)=" "
   : GOTO 110
0140 IF K$<"A" THEN 160
   : IF K$=HEX(E6)THEN 100
   : IF K$=HEX(E5)THEN 240
   : IF J>9 THEN 85
   : IF K$>"Z"THEN K$=SUBC HEX(20)
   : I=POS(M$=K$)
   : IF I=0 THEN 85
   : J=J+1
   : STR(W$,J,1)=K$
   : W0(J)=I
   : STR(M$,I,1)=" "
   : GOTO 80
   : REM %OLD LINE ERASE LOGIC
0150 IF J=0 THEN 90
   : FOR I=1TO J
   : STR(M$,W0(I),1)=STR(W$,I)
   : NEXT I
   : W$=" "
   : PRINT HEX(0D);TAB(J);
   : J=0
   : GOTO 80
0160 IF K$<>HEX(08) THEN 170
   : IF J=0 THEN 90
   : STR(M$,W0(J),1)=STR(W$,J)
   : STR(W$,J)=" "
   : J=J-1
   : PRINT HEX(082008);
   : GOTO 80
0170 IF K$<>HEX(0D) THEN 85
   : PRINT AT(X3+3,0,60);
   : IF @V$(P1)="V" THEN 180
   : IF J>2THEN 190
   : PRINT HEX(0D07);"  Words must be at least three letters";HEX(0C);
   : GOTO 80
0180 IF J>3 THEN 190
   : PRINT HEX(0D07);"  You are VULNERABLE, and need at least four-letter wo
     rds";HEX(0C);
   : GOTO 80
   : REM %TEST WORD FOR DUPLICATION
0190 MAT SEARCH W$(),=STR(W$,,J+1) TO B$()STEP 11
   : IF B$(1)=HEX(0000)THEN 200
   : PRINT HEX(0D07);" '";W$;"'  was already used"
   : M$=T$
   : GOTO 70
0200 REM POSSIBLE TEST FOR PLURAL HERE
0210 I=J-2
   : IF W(I)=10 THEN 220
   : W(I)=W(I)+1
   : W$(I,W(I))=W$
   : K=W(I)+X8-2
   : IF W(I)>5 THEN K=K+2
   : IF W(I)=6THEN PRINT AT(K-1,0);"SPARES:"
   : PRINT AT(K,B(I)-1);W$
   : GOTO 230
0220 MAT COPY W$()<I*110-98,99> TO W$()<I*110-109,99>
   : W$(I,10)=W$
   : GOSUB 800
0230 REM
0240 IF W$=" " THEN 70
0250 T$=" "&STR(W$,,1)
   : FOR I=2TO LEN(W$)
   : T$=T$&" "&STR(W$,I,1)
   : NEXT I
   : FOR I=2TO 26STEP 2
   : T$=T$&" "&STR(M$,I,1)
   : NEXT I
   : GOTO 70
   : REM %^TIMEOUT
0260 @P$(#PART)="T"
   : SELECT PRINT 005
   : PRINT AT(0,0,80*(X8-2));HEX(06);"VERIFICATION OF ";@N$(P1);"'S WORDS:"
0262 PRINT
   : PRINT "  Space, backspace, return, and FN may be used to move the cursor
     around."
0264 PRINT "  When cursor is under a word, 'N' will reject it, and 'R' will re
     position it."
0265 PRINT "  A rejected word will be replaced, if possible, from the spare wo
     rds."
0266 PRINT "  S.F. '8 is used to delete any remaining spares."
0268 %PRINT "  Move the cursor to any improper word(s), and type 'N' to reject
      it.": PRINT "  'R' will reposition the word to the end of the column."
0270 PRINT
   : PRINT "  When all the words showing are correct, press SF KEY '1"
0280 PRINT TAB(20);"-";T$;" -"
0285 FOR I=1 TO 8
   : GOSUB 800
   : NEXT I
   : PRINT AT(X8+4,0,50);AT(23,0,79);
0290 FOR J=1 TO 500
0295 REM FLUSH KEYBOARD BUFFER
   : KEYIN K$,295,295
   : NEXT J
   : I=0
   : PRINT HEX(05);
   : GOTO 340
0300 PRINT HEX(05); AT(J+X8-2,B(I)-1);
   : IF J>5 THEN PRINT HEX(0A0A);
0310 KEYIN K$,,390
   : IF K$>"Z"THEN K$=SUB HEX(20)
0320 IF K$="N" THEN 350
   : IF K$="Y"OR K$=" " THEN 330
   : IF K$="R"THEN 360
   : IF K$=HEX(08)THEN 325
   : IF K$=HEX(0D)THEN 340
   : IF K$=HEX(E6) THEN 327
   : GOTO 310
0325 J=J-1
   : IF J>=1 THEN 300
0327 I=1+MOD(I-2,8)
   : IF W$()=" "THEN 400
   : J=W(I)
   : IF J>=1 THEN 300
   : GOTO 327
0330 J=J+1
   : IF J<=W(I)THEN 300
0340 J=1
   : I=1+MOD(I,8)
   : IF W$()=" "THEN 400
   : IF W$(I,J)<>" " THEN 300
   : GOTO 340
0350 W(I)=W(I)-1
   : MAT COPY W$()<110*I+11*J-109,11*(10-J)> TO W$()<110*I+11*J-120,11*(11-J)>
   : GOSUB 800
   : FOR J1=1 TO 100
0355 KEYIN K$,355,355
   : NEXT J1
   : IF W$(I,J)<>" " THEN 300
   : GOTO 330
0360 W$=W$(I,J)
   : MAT COPY W$()<110*I+11*J-109,11*(10-J)> TO W$()<110*I+11*J-120,11*(11-J)>
   : W$(I,W(I))=W$
   : GOSUB 800
   : GOTO 300
0370 @F$(#PART)=" "
   : I=0
   : GOSUB 385
   : PRINT AT(1,0); N$;TAB(40);
   : GOSUB 385
   : PRINT N$
   : GOSUB 385
   : PRINT N$;TAB(40);
   : GOSUB 385
   : PRINT N$
   : RETURN
0375 PRINT AT(8,0,400);
   : @F$(#PART)=" "
   : FOR I=1 TO 16
   : IF @N$(I)<>" "THEN PRINT @N$(I);TAB(30);@S(I);TAB(50);@P$(I)
   : NEXT I
   : RETURN
   : REM @P$() IS DEBUG AID
0385 REM SCORE SUBROUTINE
   : N$=" "
   : I=I+1
   : IF I>16 THEN RETURN
   : IF @N$(I)=" "OR I=P1THEN 385
   : STR(N$,30-LEN(@N$(I)))=@N$(I)&" -"
   : CONVERT @S(I) TO STR(N$,1+LEN(N$)),(-#####)
   : RETURN
   : REM %FUNCTION KEY ENTRY
0390 IF K$=HEX(01) THEN 400
   : IF K$=HEX(08)THEN 395
   : IF K$=HEX(7E) OR K$=HEX(7F)THEN 327
   : GOTO 310
0395 REM SF 8
   : FOR I=1 TO 8
   : IF W$(I,6)=" "THEN 396
   : STR(W$(),110*I-54,55)=" "
   : GOSUB 800
0396 NEXT I
   : GOTO 310
   : REM %SCORE CALCULATION
0400 @P$(#PART)="W"
0410 S=0
   : FOR I=1 TO 8
   : S=S+A(1+MIN(W(I),5) ,I)
   : NEXT I
   : FOR I=1 TO 5
   : IF W(I)>=5 AND W(I+1)>=5 THEN S=S+A0(I)
0420 NEXT I
0430 IF @V$(P1)="V"AND S<500 THEN S=-500
0440 @S(P1)=@S(P1)+S
   : @F$()=ALL(41)
   : SELECT PRINT 005
   : PRINT AT(X8+22,0);AT(6,0,);@N$(P1);"  gets ";S;
   : IF @V$(P1)="V" OR @S(P1)<2000 THEN 450
   : @V$(P1)="V"
   : PRINT " points, and is now VULNERABLE with a score of ";@S(P1)
   : PRINT
   : PRINT
   : GOTO 460
0450 PRINT " points, for a net score of ";@S(P1)
0460 GOSUB 375
0470 SELECT PRINT 005(80)
   : P1=P0+MOD(P1+1-P0,P)
0490 PRINT AT(20,0);"  Press RETURN/EXECUTE to roll dice for ";@N$(P1);
   : IF G$<>"Y"OR @P9=1 THEN PRINT ", or S.F. '31 to quit";
0500 KEYIN K$,510,505
   : I=RND(1)
   : IF @F$(#PART)<>" "THEN GOSUB 375
   : GOTO 500
0505 IF K$<>HEX(1F)THEN 500
0506 DEFFN'31
   : IF G$="Y"AND @P9>1 THEN 508
   : @P$(#PART)=" "
   : @N$(#PART)=" "
   : @F$()=ALL(41)
   : @P9=@P9-1
   : LOAD T "START"
0508 PRINT "  Sorry, you can't quit because you're the global partition"
   : GOTO 500
0510 IF K$<>HEX(0D) THEN 500
   : @P$(#PART)="R"
   : @F$()=ALL(41)
   : IF G$="N"THEN 520
   : FOR I=1TO 13
   : STR(@T$,2*I,1)=STR(A$(I),1+6*RND(1))
   : NEXT I
0520 GOSUB '50("R")
   : IF K$=" "THEN 526
   : PRINT AT(20,0,80);"           Waiting for the other terminals to press ex
     ec";
0525 GOSUB '50("R")
   : IF K$=" "THEN 526
   : IF @F$(#PART)<>" "THEN GOSUB 375
   : $BREAK 10
   : GOTO 525
0526 $BREAK
   : IF G$<>"N"THEN @T=180.02
   : IF @T<=0 OR @T$=" " THEN 526
0530 REM % NEW TURN
   : INIT(20)W$(),T$
   : MAT W=ZER
0550 PRINT HEX(0D030E);"        " ;@N$(P1);
   : IF @V$(P1)="V"THEN PRINT "'s VULNERABLE";
   : ELSE PRINT "'s turn";
   : PRINT "    with";@S(P1);" points."
   : GOSUB 370
0570 SELECT PRINT 005
   : PRINT AT(X8-2,0);
   : PRINT    "       \A0\B3\A0\A0\A0\A0\A0\B4\A0\A0\A0\A0\A0\B5\A0\A0\A0\A0\A
     0\A0\A0\B6\A0\A0\A0\A0\A0\A0\A0\B7\A0\A0\A0\A0\A0\A0\A0\A0\A0\B8\A0\A0\A0
     \A0\A0\A0\A0\A0\A0\B9\A0\A0\A0\A0\A0\A0\A0\A0\A0\A0\A0\B1\B0\A0\A0\A0"
   : IF X6$="N"THEN 590
   : PRINT "        60   120   200     300     500       750      1000
      1500"
0580 FOR I=1 TO 4
   : PRINT "        10    20    50     100     150       250       500
      1500"
   : NEXT I
   : PRINT "          300   500    800    1200     1850";HEX(0C)
0590 IF @V$(P1)=" "THEN 600
   : PRINT AT(X8-2,0);
   : FOR I=1 TO 6
   : PRINT TAB(12)
   : NEXT I
   : PRINT TAB(14)
0600 REM
0610 T=999
0620 IF @V$(P1)=" "THEN T$=STR(@T$,,20)
   : ELSE T$=@T$
0630 PRINT AT(23,0);"  Type  FN key to scramble,  ERASE to replace letters";
0730 GOTO 70
0799 REM % DISPLAY 10 WORDS, 1 COLUMN
0800 PRINT AT(X8-1,0);HEX(06);
   : FOR J1=1 TO 10
   : IF J1=6THEN PRINT HEX(0A0A);
   : PRINT STR(Z9$,,B(I));STR(W$(I,J1),,I+2)
   : NEXT J1
   : RETURN
1000 DEFFN'50(K$)
   : REM CHECK THAT ALL PARTICIPATING TERMINALS ARE IN THE 'K$' STATE
1010 P$()=@P$()
   : B$=" "&K$
   : $TRAN(P$(),B$)R
   : IF POS(P$()<>" ")=0 THEN K$=" "
   : ELSE K$="W"
   : RETURN
1020 DEFFN'51(K$)
   : REM WAIT TILL ALL PARTICIPATING TERMINALS ARE IN THE 'K$' STATE
1030 B$=" "&K$
1040 P$()=@P$()
   : $TRAN(P$(),B$)R
   : IF POS(P$()<>" ")=0 THEN RETURN
   : $BREAK 10
   : GOTO 1040
8000 @T=-100
   : @T$=" "
   : @P9=0
   : @F$()=" "
8005 SELECT P,PRINT 005,INPUT 001
   : PRINT HEX(03);"   WORDO -  A game similar to PERQUACKEY"
   : PRINT
   : PRINT
8007 LIST D 10
   : PRINT HEX(0D0C);TAB(8)
   : PRINT
8010 B(1)=8
   : FOR I=2 TO 8
   : B(I)=B(I-1)+I+3
   : NEXT I
8020 A$(1)="INPUTF"
   : A$(2)="EEEAAA"
   : A$(3)="BRITHK"
   : A$(4)="EZQXJV"
   : A$(5)="FUSHIR"
   : A$(6)="TORLND"
   : A$(7)="AAAEEE"
   : A$(8)="MOCOWP"
   : A$(9)="GRUSIM"
8030 A$(10)="LOWBOY"
   : A$(11)="JCDMGK"
   : A$(12)="WVSYSQ"
   : A$(13)="BPFNHL"
8040 INIT(08)Z8$
   : Z9$=HEX(00)&ALL(09)
8050 FOR J=1 TO 8
   : A(1,J)=0
   : READ A(2,J)
   : READ A(6,J)
   : FOR I=3 TO 6
   : A(I,J)=A(I-1,J)+A(6,J)
   : NEXT I
   : NEXT J
8060 P$=$PSTAT(1)
   : IF STR(P$,9,1)="V"THEN P$="VP"
   : ELSE P$="MVP"
   : IF P$="VP"THEN U=.00125
   : ELSE U=.003
   : REM THE FIRST COUNT IS FOR A VP, THE SECOND FOR AN MVP
8070 FOR I=1 TO 5
   : READ A0(I)
   : NEXT I
   : REM %NON-COMMON SETUP
8100 X3=3
   : X8=11
8102 X6$="Y"
   : REM FLAG TO PRINT POINT VALUES
8105 W$="N"
   : INPUT "Do you need instructions",W$
   : IF STR(W$,,1)="Y"OR STR(W$,,1)="y"THEN GOSUB 8200
8110 IF P$="MVP"THEN PRINT "  (For multi-terminal play, only one player may be
      on any terminal)"
8120 IF P$="VP"THEN W$="2"
   : ELSE W$="1"
   : LINPUT "Number of players on this terminal (1 TO 5)",W$
   : CONVERT W$ TO P
   : ERRORI=ERR
   : GOTO 8120
8121 P=INT(P)
   : IF P>5 OR P<1 THEN 8120
8122 G$=" "
   : IF P>1OR P$="VP"THEN 8130
   : G$="Y"
   : DEFFN@PART "WORDO"
   : ERRORI=ERR
   : G$="N"
   : REM G$ IS A FLAG THAT SAYS WHETHER " " WE ARE ONLY PARTITION, "Y" WE ARE
     THE GLOBAL, OR "N" WE ARE ADDITIONAL PARTITIONS
8123 SELECT @PART "WORDO"
   : @P9=@P9+1
   : @P$(#PART)="T"
8130 IF G$=" "THEN @P9=1
   : P0=#PART
   : FOR I=P0 TO P+P0-1
   : @S(I)=0
   : @V$(I)=" "
8140 IF G$=" "THEN @N$(I)="Player"
   : ELSE @N$(I)="Player on Port"
   : CONVERT I TO STR(@N$(I),2+LEN(@N$(I))),(##)
   : @F$()=ALL(41)
   : PRINT "NAME OF ";@N$(I);
   : INPUT @N$(I)
   : IF @N$(I)=" "THEN 8140
   : GOTO 8160
8150 REM SHOULD CHECK FOR DUPLICATE NAMES ----
8160 NEXT I
   : @F$()=ALL(41)
   : P1=0
   : PRINT HEX(03)
   : GOTO 460
8200 SELECT PRINT 005(64)
   : PRINT HEX(03);"RULES FOR PLAYING PERQUACKEY:";
8210 PRINT "UP TO FIVE MAY PLAY. EACH TRIES TO SCORE 5000 POINTS BY FORMING WO
     RDS OF THREE OR MORE LETTERS FROM THE SETS OF TEN LETTERS THE 2200 DISPLA
     YS.";
8220 PRINT "THE LETTERS ARE 'ROLLED' BY PRESSING 'EXECUTE'."
   : PRINT "TEN LETTERS WILL BE DISPLAYED NEAR THE TOP OF THE  SCREEN.";
8230 PRINT "YOU HAVE THREE MINUTES TO BUILD AS MANY WORDS AS YOU CAN.";
8240 PRINT "HOWEVER, YOU MAY USE EACH LETTER ONLY ONCE (IF A LETTER IS      DU
     PLICATED, YOU MAY USE IT AS MANY TIMES AS IT APPEARS).";
8250 PRINT "YOU NEED FIVE EACH OF THREE, FOUR, FIVE, ETC. LETTER WORDS      (Y
     OU  NEED NOT FINISH ONE GROUP TO WORK ON ANOTHER).";
8260 PRINT "IF YOU ENTER MORE THAN FIVE WORDS OF A SIZE, ONLY THE LAST FIVE WI
     LL BE SHOWN.  AT ANY TIME SF KEY '4 WILL SCRAMBLE THE LETTERS";
8265 PRINT "FOR YOU, AND PRESSING SF KEY '5 WILL REGROUP THOSE LETTERS BACK TO
      THE BEGINNING.  PRESS SF '0 WHEN YOU DESPAIR OF FINDING MORE WORDS.";
8270 PRINT " PRESS 'EXECUTE' FOR MORE RULES.";
8280 I=RND(1)
   : KEYIN K$,8290,8280
   : GOTO 8280
8290 PRINT HEX(03);"HOWEVER, THE EXTRA WORDS ARE SAVED IN CASE ANY OF THE LAST
      FIVE ARE NOT VALID. YOU CAN USE A WORD ONLY ONCE AND CANNOT ADD 'S'  AT
     THE END TO MAKE IT ANOTHER WORD.";
8300 PRINT "UNTIL YOU GET A SCORE OF 2000, ONLY TEN LETTERS ARE SHOWN AND   YO
     U CAN BUILD WORDS OF THREE OR MORE LETTERS.";
8310 PRINT "AFTER YOU SCORE 2000, 13 LETTERS ARE SHOWN EACH TIME AND YOU    MU
     ST BUILD WORDS OF 4 OR MORE LETTERS. YOU MUST SCORE AT LEAST  500 POINTS
     EACH TURN SINCE YOU ARE NOW VULNERABLE.";
8320 PRINT "ONCE VULNERABLE, IF YOU FAIL TO SCORE 500 POINTS ON A TURN, YOU LO
     SE 500 POINTS ON THAT TURN. YOU REMAIN VULNERABLE HOWEVER,    EVEN IF YOU
     R SCORE DROPS BELOW 2000.";
8330 PRINT "PRESS 'EXECUTE' FOR ADDITIONAL RULES"
8350 I=RND(1)
   : KEYIN K$,8360,8350
   : GOTO 8350
8360 PRINT HEX(03);"THERE ARE BONUSES FOR COMPLETING FIVE VALID WORDS IN ADJAC
     ENT   COLUMNS. FOR EXAMPLE: FINISHING 3 & 4 LETTER-WORDS IS WORTH A   BON
     US OF 300 POINTS OVER THE USUAL SCORE.";
8370 DIM C$(5)5
   : C$()="ONE  TWO  THREEFOUR FIVE"
8380 PRINT "THERE ARE LARGER BONUSES FOR COMPLETING ADJACENT COLUMNS OF     LO
     NGER WORDS.";
8410 PRINT "ONLY WORDS FOUND IN A STANDARD DICTIONARY MAY BE USED - PROPER  NA
     MES, FORIEGN WORDS, ABBREVIATIONS AND WORDS ALWAYS CAPITALIZEDARE NOT ALL
     OWED.";
8420 PRINT "ADDING AN 'S' TO A WORD TO FORM ITS PLURAL IS NOT ALLOWED. ENTERWO
     RDS BY TYPING THEM ON THE KEYBOARD, REVIEWING ON THE SCREEN   AND PRESSIN
     G 'EXECUTE'.";
8450 PRINT " PRESS 'EXECUTE' FOR SCORING VALUES."
8460 KEYIN K$,,8450
8470 PRINT HEX(03);"SCORING (ALL SCORING IS DONE BY THE 2200)"
8480 PRINT "WORDS    3    4    5    6    7    8    9   10"
8490 FOR X=2TO 6
   : PRINTUSING 9710,C$(X-1),A(X,1),A(X,2),A(X,3),A(X,4),A(X,5),A(X,6),A(X,7),
     A(X,8)
   : NEXT X
8500 PRINT " BONUS    300  500  800  1200 1850"
8510 PRINT
   : PRINT "BONUS SCORING :"
8520 PRINT "  IF YOU COMPLETE FIVE EACH IN TWO ADJACENT COLUMNS, YOU ARE    GI
     VEN THE BONUS SCORE AS LISTED BETWEEN THE COLUMNS."
8530 PRINT
   : PRINT
9700 SELECT PRINT 005(80)
   : RETURN
9710 %#####  #### #### #### #### #### #### #### ####
9860 DATA 60,10,120,20,200,50,300,100,500,150,750,250,1000,500,1500,1500,300,5
     00,800,1200,1850
9950 DEFFN'20
   : LOAD DC F"!"
9980 DEFFN'15
   : PRINT "SAVING THE PROGRAM"
   : SCRATCH F "WORDOVP"
   : SAVE F ()"WORDOVP"
   : RETURN
9990 DEFFN'14
   : LIST "WORDOVP"D
   : LIST "WORDOVP"V
   : LIST #
   : LIST '
   : RETURN