WE-THEY keeps score for two-person or two-team games.
To use WE-THEY, enter the program as shown and save by RUN 620. Enter the name of the game, winning score, whether the total of each WE-THEY entry must equal a predetermined value, and verify the information offered. The scorepad appears on the screen, displaying the game name, winning score and a prompting box. Under the headings WE and THEY you see the last score input and the totals.
First input the score for WE, then THEY. The prompting box waits for the next entries at game’s end. When someone wins, the scorepad scrolls offscreen and the winning score appears. To score a new game, just press ENTER.
If no one wins after 13 score entries, the scorepad scrolls offscreen and reappears with the current scores and totals listed again. This ensures the prompt box, which scrolls with the scoring, remains onscreen.
Variables
WT--scoring total for WE TW--scoring total for THEY J--controls print position for prompting box C--if C=0, the total of WE and THEY entries need not equal a predeter- mined value; if C=9, the total must meet predetermined value (line 298) SC--winning score U--if U=0 then score applies to WE. If U=1, score applies to THEY (lines 412, 414) T--if T<>0, it represents the total of WE and THEY. Under this condi- tion, only scores whose total equals the predetermined value T are valid K--counts number of scoring lines displayed on screen. When K=13, scorepad is redrawn and K set to zero (lines 130, 133)
Line Functions
100-109 draw scorepad format on screen 111-128 accept input scores 130-135 redraw display if K=13 295-315 check whether WE plus THEY must equal a predetermined value, calculate totals, list scores and totals on scorepad 400-414 check for unacceptable en- tries (characters other than 0-9) 500-542 obtain information at start of program on nature of game to score 550-575 display end of game info 600-615 accept answers to YES and NO questions at start of game 700-705 are a delay routine
1 REM "WE-THEY"
2 LET J=4
5 LET C=0
6 LET T=0
10 LET A$="▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀"
12 LET B$="▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄"
14 LET W$="0"
15 LET S$="0"
16 LET WT=0
17 LET TW=0
18 LET T$="0"
19 LET J$="0"
20 GOTO 500
90 FOR N=1 TO 18
92 SCROLL
94 NEXT N
100 PRINT ;AT 16,2;"** ";SC;" **";AT 17,22;"▛▀▀▀▀▀▀▀▀▜";TAB 0;A$;TAB 22;"▌ SCORE ▐";TAB 11-INT (.5*LEN N$);N$;TAB 22;"▌ ▐";TAB 0;B$;TAB 22;"▌ ▐";TAB 22;"▙▄▄▄▄▄▄▄▄▟"
101 LET K=0
102 SCROLL
104 PRINT TAB 8;"WE";TAB 14;"THEY"
105 SCROLL
106 PRINT "▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒"
107 SCROLL
108 PRINT TAB 11;"▒"
109 SCROLL
110 GOSUB 310
111 LET J=J+1
112 LET U=0
113 PRINT AT 20-J,27;" ";AT 20-J,25;"WE ??";AT 20-(J-1),27;" "
114 INPUT D$
116 GOSUB 400
117 PRINT AT 20-J,27;" ";AT 20-J,31-LEN D$;D$
118 LET W$=D$
120 PRINT AT 20-(J-1),27;" ";AT 20-(J-1),23;"THEY ??"
121 LET U=1
122 INPUT D$
124 GOSUB 400
125 PRINT AT 20-(J-1),27;" ";AT 20-(J-1),31-LEN D$;D$
126 LET T$=D$
128 GOSUB 295
130 IF K=13 THEN LET J=4
133 IF K=13 THEN GOTO 90
135 GOTO 111
295 LET TT=VAL W$+VAL T$
296 IF TT<0 THEN LET TT=ABS TT
298 IF C=9 AND T<>TT THEN GOTO 113
300 SCROLL
302 LET WT=WT+VAL W$
303 LET S$=STR$ WT
304 LET TW=TW+VAL T$
305 LET J$=STR$ TW
310 PRINT AT 21,4-LEN W$;W$;;TAB 10-LEN S$;S$;TAB 11;"▒";TAB 17-LEN J$;J$;TAB 23-LEN T$;T$
312 LET K=K+1
313 IF S$=J$ THEN GOTO 315
314 IF VAL S$>=SC OR VAL J$>=SC THEN GOTO 550
315 RETURN
400 IF D$="" AND U=0 THEN GOTO 113
402 IF D$="" AND U=1 THEN GOTO 122
404 FOR A=1 TO LEN D$
406 IF D$(A)=CHR$ 22 THEN NEXT A
408 IF D$(A)<CHR$ 28 OR D$(A)>CHR$ 37 THEN GOTO 412
410 NEXT A
411 RETURN
412 IF U=0 THEN GOTO 113
414 IF U=1 THEN GOTO 122
500 PRINT AT 2,0;A$;TAB 4;"WE-THEY SCOREPAD";TAB 0;B$
502 PRINT AT 6,0;"NAME OF GAME ???"
504 INPUT M$
505 LET N$=M$
506 IF LEN M$>18 THEN LET N$=M$(1 TO 18)
507 PRINT AT 7,12;N$
508 PRINT AT 9,0;"WINNING SCORE ???"
510 INPUT SC
512 PRINT AT 10,20;SC
514 PRINT AT 12,0;"DOES THE TOTAL OF EACH ""WE-THEY""";TAB 0;"INPUT HAVE TO EQUAL";TAB 0;"A SET VALUE ?"
516 GOSUB 600
518 IF E$="Y" THEN GOTO 522
520 GOTO 528
522 PRINT AT 16,0;"ENTER VALUE..."
523 LET C=9
524 INPUT T
526 PRINT AT 17,20;T
528 PRINT AT 19,0;"SATISFIED ?"
530 GOSUB 600
538 CLS
540 IF E$="N" THEN GOTO 500
542 GOTO 100
550 GOSUB 700
556 PRINT AT 5,0;N$;TAB 0;A$(1 TO 18);AT 9,0;A$;TAB 0;"GAME FINISHED...";;TAB 0;B$;TAB 6;"▌";TAB 6;"▌";TAB 10;"WE - ";S$;TAB 6;"▌";TAB 6;"▌";TAB 8;"THEY - ";J$
558 PRINT AT 20,0;"HIT ENTER FOR NEW GAME..."
560 INPUT E$
561 LET W$="0"
562 LET T$="0"
563 LET S$="0"
564 LET J$="0"
565 LET J=4
566 LET WT=0
568 LET TW=0
570 GOSUB 700
575 GOTO 100
600 PRINT TAB 20;"(Y-OR-N) ???"
602 IF INKEY$="Y" OR INKEY$="N" THEN GOTO 605
603 GOTO 602
605 LET E$=INKEY$
606 POKE 16442,PEEK 16442+1
608 PRINT TAB 20;" ";E$;" "
610 FOR N=1 TO 20
612 NEXT N
615 RETURN
620 SAVE "SCORE"
625 GOTO 2
700 FOR N=0 TO 21
702 SCROLL
703 NEXT N
705 RETURN
SYNTACTIC SUM: 29955, 8K ROM
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.