💾 Archived View for mirrors.apple2.org.za › archive › ground.icaen.uiowa.edu › apple8 › Games › back… captured on 2023-01-29 at 10:50:46.

View Raw

More Information

-=-=-=-=-=-=-


Return-Path: <@ricevm1.rice.edu:LISTSERV@UTARLVM1.BITNET>
Received: from ricevm1.rice.edu [128.42.30.2] by primeg.weeg.uiowa.edu ; 01 Oct 90 11:42:35 CST
Received: from UTARLVM1.BITNET by ricevm1.rice.edu (IBM VM SMTP R1.2.1MX) with BSMTP id 2559; Mon, 01 Oct 90 11:40:23 CDT
Received: by UTARLVM1 (Mailer R2.07) id 0162; Mon, 01 Oct 90 11:40:32 CDT
Date: Mon, 1 Oct 90 11:40:22 CDT
From: Revised List Processor (1.6e) <LISTSERV%UTARLVM1.BITNET@ricevm1.rice.edu>
Subject: File: "APPLE2-L 87-00289" being sent to you
To:   CMDSEN@PRIMEG.WEEG.UIOWA.EDU

=========================================================================
Date: Wed, 9 Dec 87 00:54 CST
Reply-to: Apple II List <APPLE2-L@BROWNVM>
Sender: Apple II List <APPLE2-L@BROWNVM>
From: 2QZNHONE@UKANVAX
Subject: Backgammon game for the Apple II

This is the game of Backgammon written in BASIC.
Just EXEC the file.  Have fun!!!!!!!!


---------------------------CUT HERE---------------------------------
 100  REM  **************
 110  REM  * BACKGAMMON *
 120  REM  **************
 130  REM  COPYRIGHT 1984,1985
 140  REM  EMERALD VALLEY PUBLISHING CO.
 150  REM  BY DENNIS WEBBER & THE HCM STAFF
 160  REM  HOME COMPUTER MAGAZINE
 170  REM  VERSION 5.1.1
 180  REM  APPLE II FAMILY APPLESOFT
 190  REM
 200  IF  PEEK (103) = 1 AND  PEEK (104) = 64 THEN 230
 210  POKE 103,1: POKE 104,64: POKE 16384,0: POKE 16384,0: POKE 16385,0: POKE 16
386,0
 220  PRINT  CHR$ (4);"RUN BACKGAMMON"
 230  DEF  FN Z(X) = (P(X + A6) > 0) + (P(X + A8) > 0)
 240  TEXT : HOME : VTAB 12: HTAB 15: PRINT "BACKGAMMON": VTAB 23: HTAB 15: PRIN
T "PLEASE WAIT"
 250  DEF  FN D(A) =  INT ( RND (1) * 6) + 1
 260  GOSUB 2400
 270  GOSUB 2920
 280  INPUT "NAME ?";NA$: PRINT
 290  IF  LEN (NA$) > 8 THEN  PRINT "8 CHARACTERS MAXIMUM": GOTO 280
 300 D1 =  FN D(0):D2 =  FN D(0): PRINT NA$;" ROLLED ";D1: PRINT "I ROLLED ";D2:
 FOR TD = 1 TO 2000: NEXT
 310  IF D1 < D2 THEN  PRINT "I GO FIRST":B4 = 1: FOR TD = 1 TO 2000: NEXT : GOT
O 410
 320  IF D2 < D1 THEN  PRINT "YOU GO FIRST":B4 = 0: FOR TD = 1 TO 2000: NEXT : G
OTO 410
 330  GOTO 300
 340  PRINT "YOUR TURN ";NA$:A6 = D1:A8 = D2:B4 = 0: FOR TD = 1 TO 500: NEXT : G
OTO 360
 350  PRINT "MY TURN":A6 = D1:A8 = D2:B4 = 1: FOR TD = 1 TO 2000: NEXT
 360  IF B4 = 0 THEN C$ = NA$: GOTO 380
 370  GOTO 400
 380  PRINT "ROLL ";C$
 390  IF A13 THEN  GET A$
 400 D1 =  FN D(0):D2 =  FN D(0): IF D1 < D2 THEN A8 = D1:A6 = D2: GOTO 420
 410 A6 = D1:A8 = D2
 420  GOSUB 3270
 430 D3 = 2: IF A6 = A8 THEN D3 = 4
 440  ON B4 + 1 GOTO 450,760
 450  IF P(25) = 0 THEN 490
 460  IF P(25 - A6) >  - 2 OR P(25 - A8) >  - 2 THEN 480
 470  PRINT "BLOCKED":B4 = 1 - B4: GOTO 350
 480  PRINT "FROM BAR";:A4 = 25: GOSUB 2320: GOTO 590
 490  FOR X = 25 TO A6 + 1 STEP  - 1: IF P(X) >  = 1 AND P(X - A6) >  - 2 THEN 5
50
 500  NEXT X: FOR X = 25 TO A8 + 1 STEP  - 1: IF P(X) >  = 1 AND P(X - A8) >  -
2 THEN ZZ = 25: GOTO 550
 510  NEXT X: IF A5 < 7 AND A5 - A6 < 1 THEN 550
 520  IF A5 < 7 AND A5 - A8 < 1 THEN 550
 530  IF (A5 < 7 AND P(A6) > 0) OR (A5 < 7 AND P(A8) > 0) THEN 550
 540  PRINT "YOU CAN'T MOVE":B4 = 1 - B4: GOTO 350
 550  GOSUB 2240
 560  IF P(ZZ) < 1 THEN  GOSUB 2230: GOTO 450
 570 A4 = ZZ
 580  GOSUB 2320
 590 A2 = ZZ
 600  IF A2 = B5 THEN 710
 610  IF P(A2) >  - 2 THEN 630
 620  GOSUB 2230: GOTO 450
 630  IF A4 - A2 = A6 THEN A6 = A8: GOTO 660
 640  IF A4 - A2 = A8 THEN A8 = A6: GOTO 660
 650  GOSUB 2230: GOTO 450
 660 P(A4) = P(A4) - 1: IF P(A2) =  - 1 THEN P(0) = P(0) + 1:P(A2) = 1: GOSUB 29
20: GOTO 680
 670 P(A2) = P(A2) + 1: GOSUB 2920
 680  IF B2 = 0 THEN 2150
 690 D3 = D3 - 1: IF D3 = 0 THEN B4 = 1: GOTO 350
 700  GOTO 450
 710  IF A5 > 6 THEN 740
 720  IF A4 = A8 OR (A4 = A5 AND A8 > A5) THEN A8 = A6: GOTO 750
 730  IF A4 = A6 OR (A4 = A5 AND A6 > A5) THEN A6 = A8: GOTO 750
 740  GOSUB 2230: GOTO 450
 750 P(A4) = P(A4) - 1:P2 = P2 + 1: GOSUB 2920: GOTO 680
 760  IF P(0) = 0 AND A9 = 0 AND A7 > 18 THEN 1560
 770  IF P(0) = 0 THEN 890
 780  IF P(A6) > 1 AND P(A8) > 1 THEN B4 = 0: PRINT "I'M BLOCKED": GOTO 340
 790  IF P(A6) = 1 THEN A2 = A6: GOTO 850
 800  IF P(A8) = 1 THEN A2 = A8: GOTO 850
 810  IF  SGN (P(A6)) =  - 1 THEN A2 = A6: GOTO 850
 820  IF P(A8) <  =  - 1 THEN A2 = A8: GOTO 850
 830  IF P(A6) = 0 THEN A2 = A6: GOTO 850
 840  IF P(A8) = 0 THEN A2 = A8
 850 P(0) = P(0) - 1: PRINT "FROM BAR TO --";A2: IF A2 = A6 THEN A6 = A8: GOTO 8
70
 860 A8 = A6
 870  IF P(A2) = 1 THEN P(25) = P(25) + 1:P(A2) =  - 1: GOSUB 2920: GOTO 2110
 880 P(A2) = P(A2) - 1: GOSUB 2920: GOTO 2110
 890  IF A7 > A5 THEN 1980
 900  IF D3 = 1 OR D3 = 3 THEN 1140
 910  FOR X = 24 TO 18 STEP  - 1: IF P(X) <  > 1 THEN 980
 920  IF (P(X - A6) <  - 2 OR P(X - A6) =  - 1) AND (P(X - A8) <  - 2 OR P(X - A
8) = - 1) THEN 2040
 930  IF X - A6 = X - A8 AND P(X - A6) <  - 1 THEN 2040
 940  IF X + A6 + A8 > 24 THEN 960
 950  IF X - A6 < 19 AND P(X - A6) < 0 AND P(X + A6 + A8) < 0 THEN 2040
 960  IF X + A6 + A8 > 24 THEN 980
 970  IF (P(X - A6) <  - 2 OR P(X + A6) =  - 1) AND P(X + A6 + A8) < 0 THEN 2040
 980  NEXT X: FOR X = 24 TO 19 STEP  - 1: IF P(X) <  >  - 1 OR X > A5 OR  FN Z(X
) > 0 THEN 1070
 990  IF (P(X - A6) <  - 2 OR P(X - A6) =  - 1) THEN 2040
 1000  IF (P(X - A8) =  - 1 OR P(X - A8) <  - 2) THEN 2050
 1010  IF (P(X - A6 - A8) =  - 1 OR P(X - A6 - A8) <  - 2) AND P(X - A6) = 1 THE
N A4 = X - A6 - A8:A2 = X - A8: GOTO 2060
 1020  IF (P(X - A6 - A8) =  - 1 OR P(X - A6 - A8) <  - 2) AND P(X - A8) = 1 THE
N A4 = X - A6 - A8:A2 = X - A6: GOTO 2060
 1030  IF (P(X - A6 - A8) =  - 1 OR P(X - A6 - A8) <  - 2) AND P(X - A8) < 2 THE
N A4 = X - A6 - A8:A2 = X - A6: GOTO 2060
 1040  IF (P(X - A6 - A8) =  - 1 OR P(X - A6 - A8) <  - 2) AND P(X - A6) < 2 THE
N A4 = X - A6 - A8:A2 = X - A8: GOTO 2060
 1050  IF P(X - A6 - A8) < 0 AND P(X - A6) < 2 AND X - A6 - A8 < 19 THEN A4 = X
- A6 - A8:A2 = X - A8: GOTO 2060
 1060  IF P(X - A6 - A8) < 0 AND P(X - A8) < 2 AND X - A6 - A8 < 19 THEN A4 = X
- A6 - A8:A2 = X - A6: GOTO 2060
 1070  NEXT X: FOR X = 24 TO 18 STEP  - 1: IF A5 < 18 THEN 1140
 1080  IF P(X) > 1 OR X > A5 THEN 1130
 1090  IF (P(X - A6) =  - 2 AND X - A6 < 13) OR ((P(X - A6) =  - 1 OR P(X - A6)
<  - 2) AND (P(X - A8) =  - 1 OR P(X - A8) <  - 2)) THEN 2040
 1100  IF (P(X - A6) =  - 1 OR P(X - A6) <  - 2 OR (X - A6 < 19 AND P(X - A6) <
0)) THEN 1120
 1110  GOTO 1130
 1120  IF (P(X - A8) =  - 1 OR P(X - A8) <  - 2 OR (X - A8 < 19 AND P(X - A8) <
0)) THEN 2040
 1130  NEXT X
 1140  FOR X = 24 TO 7 STEP  - 1: IF P(X) <  >  - 1 OR X > A5 OR  FN Z(X) > 0 TH
EN 1170
 1150  IF (P(X - A6) =  - 1 OR P(X - A6) <  - 2) AND A1 > 3 THEN 2040
 1160  IF X < 19 AND (P(X - A6) =  - 1 OR P(X - A6) <  - 2) THEN 2040
 1170  NEXT X: FOR X = 24 TO 18 STEP  - 1: IF A5 < 18 THEN 1290
 1180  IF P(X) <  >  - 1 OR X > A5 OR  FN Z(X) > 0 THEN 1280
 1190  IF (P(X - A6) =  - 1 OR P(X - A6) <  - 2) OR (P(X - A6) < 0 AND X - A6 <
19) THEN 2040
 1200  IF X + A6 > 24 THEN 1220
 1210  IF P(X + A6) <  =  - 1 OR (X + A6 > A5 AND P(X + A6) < 2) THEN 2000
 1220  IF X + A8 > 24 THEN 1240
 1230  IF P(X + A8) <  =  - 1 OR X + A8 > A5 THEN 2010
 1240  IF X + A6 > 24 THEN 1260
 1250  IF P(X + A6) < 2 AND X + A6 > A5 THEN 2000
 1260  IF X + A8 > 24 THEN 1280
 1270  IF P(X + A8) < 2 AND X + A8 > A5 THEN 2010
 1280  NEXT X
 1290  FOR X = 24 TO 19 STEP  - 1: IF A5 < 19 THEN 1360
 1300  IF P(X) <  >  - 1 OR X > A5 OR  FN Z(X) > 0 THEN 1350
 1310  IF X + A6 > 24 THEN 1330
 1320  IF (X + A6 > A5 AND P(X + A6) < 2) THEN 2000
 1330  IF X + A8 > 24 THEN 1350
 1340  IF (X + A8 > A5 AND P(X + A8) < 2) THEN 2010
 1350  NEXT X
 1360  IF (A1 > 2 AND P(25) > 0) OR A1 > A3 THEN 1380
 1370  GOTO 1420
 1380  FOR X = 24 TO 19 STEP  - 1: IF P(X) <  >  - 1 OR  FN Z(X) > 0 THEN 1410
 1390  IF X - A6 < 19 AND P(X - A6) < 0 THEN 2040
 1400  IF X - A8 < 19 AND P(X - A8) < 0 THEN 2050
 1410  NEXT X
 1420  FOR X = 1 TO 12: IF P(X) >  - 1 THEN 1450
 1430  IF P(X + A6) = 1 THEN 2000
 1440  IF P(X + A8) = 1 THEN 2010
 1450  NEXT X: FOR X = 18 TO 7 STEP  - 1: IF P(X) <  >  - 1 OR X > A5 OR  FN Z(X
) > 1 THEN 1480
 1460  IF P(X - A6) <  - 2 OR P(X - A6) =  - 1 THEN 2040
 1470  IF P(X - A8) <  - 2 OR P(X - A8) =  - 1 THEN 2050
 1480  NEXT X: FOR X = 1 TO 24 - A6: IF P(X) <  >  - 1 THEN 1500
 1490  IF P(X + A6) <  =  - 1 OR (X + A6 > A5 AND X + A6 < 25) THEN 2000
 1500  NEXT X: FOR X = 1 TO 24 - A6: IF P(X) <  - 2 AND (P(X + A6) <  =  - 1 OR
(X + A6 > A5 AND X + A6 < 25)) THEN 2000
 1510  NEXT X: IF P(1) =  - 2 AND P(1 + A6) < 2 AND P(1 + A6 + A8) < 0 THEN X =
1: GOTO 2000
 1520  FOR X = A7 TO 18: IF (P(X) =  - 1 OR P(X) <  - 2) AND P(X + A6) < 2 THEN
2000
 1530  NEXT X: FOR X = A7 TO 24 - A6: IF  SGN (P(X)) =  - 1 AND P(X + A6) < 2 TH
EN 2000
 1540  NEXT X: FOR X = A7 TO 24 - A8: IF P(X) <  =  - 1 AND P(X + A8) < 2 THEN 2
010
 1550  NEXT X: GOSUB 2220: GOTO 360
 1560  IF A7 > A5 THEN 1830
 1570  IF P(25 - A6) <  - 2 OR P(25 - A6) =  - 1 THEN 2020
 1580  IF P(25 - A8) <  - 2 OR P(25 - A8) =  - 1 THEN 2030
 1590  FOR X = A7 TO 24: IF P(X) >  - 1 THEN 1800
 1600  IF D3 = 1 OR D3 = 3 THEN 1780
 1610 Y =  ABS (P(X)): IF Y > 3 THEN Y = 4
 1620  ON Y GOTO 1750,1630,1690,1750
 1630  IF A7 + A6 > 24 AND A7 + A8 > 24 THEN 2000
 1640  IF A7 + A6 > 24 AND A7 + A8 > A5 THEN 2000
 1650  IF X + A8 > 24 THEN 1670
 1660  IF X + A6 > 24 AND X = A7 AND P(X + A8) < 2 THEN 2000
 1670  IF X + A8 > 24 AND X + A6 > 24 AND A8 = A7 THEN 2010
 1680  IF X + A8 > 24 AND (X + A6 > A5 AND X + A6 < 25) THEN  IF P(X + A6) <  =
 - 1 THEN 2010
 1690  IF 25 - A6 = X THEN 2020
 1700  IF X + A6 > A5 THEN 1720
 1710  GOTO 1740
 1720  IF X + A6 < 25 THEN  IF P(X + A6) < 1 THEN 2000
 1730  GOTO 1750
 1740  IF X + A6 < 25 THEN  IF  SGN (P(X + A6)) =  - 1 THEN 2000
 1750  IF X + A8 > 24 AND X = A7 THEN 2000
 1760  IF X + A8 > A5 THEN  IF P(X + A8) < 2 THEN 2000
 1770  IF  SGN (P(X + A8)) =  - 1 AND (P(X + A8) =  - 1 OR P(X + A8) <  - 2) THE
N 2010
 1780  IF P(X) =  - 1 THEN  IF X + A6 < 25 THEN  IF P(X + A6) < 0 THEN 2000
 1790  IF P(X + A8) < 0 AND X + A8 < 25 AND P(X) =  - 1 THEN 2010
 1800  NEXT X: FOR X = 24 TO A7 STEP  - 1: IF X + A6 > 24 OR P(X) =  > 0 THEN 18
20
 1810  IF (P(X) =  - 1 OR P(X) <  - 2) AND (P(X + A6) OR X + A6 > A5) AND (P(X +
 A6) < 2) THEN 2000
 1820  NEXT X
 1830  IF  SGN (P(25 - A6)) =  - 1 THEN 2020
 1840  IF  SGN (P(25 - A8)) =  - 1 THEN 2030
 1850  IF A7 + A6 > 24 THEN 1980
 1860  IF A7 + A8 > 24 THEN 1990
 1870  FOR X = A7 TO 24: IF P(X) >  - 1 OR (X + A6 > 24 AND X + A8 > 24) THEN 19
00
 1880  IF P(X + A6) = 0 THEN 2000
 1890  IF P(X + A8) = 0 THEN 2010
 1900  NEXT X: FOR X = A7 TO 24: IF P(X) >  - 1 THEN 1950
 1910  IF X + A6 > 24 THEN 1950
 1920  IF P(X + A6) < 2 THEN 2000
 1930  IF X + A8 > 24 THEN 1950
 1940  IF P(X + A8) < 2 THEN 2010
 1950  NEXT X: IF A7 + A6 < 5 THEN  IF P(A7 + A6) < 2 THEN 1980
 1960  IF A7 + A8 < 25 THEN  IF P(A7 + A8) < 2 THEN 1980
 1970  GOSUB 2220: GOTO 360
 1980 A4 = A7:A2 = A7 + A6: GOTO 2060
 1990 A4 = A7:A2 = A7 + A8: GOTO 2060
 2000 A4 = X:A2 = X + A6: GOTO 2060
 2010 A4 = X:A2 = X + A8: GOTO 2060
 2020 A4 = 25 - A6:A2 = 25: GOTO 2060
 2030 A4 = 25 - A8:A2 = 25: GOTO 2060
 2040 A4 = X - A6:A2 = X: GOTO 2060
 2050 A4 = X - A8:A2 = X
 2060 P(A4) = P(A4) + 1: IF A2 - A4 = A6 THEN A6 = A8: GOTO 2080
 2070 A8 = A6
 2080  IF A2 > 24 THEN P1 = P1 + 1:A2 = B5: GOSUB 2140: GOSUB 2920: GOTO 2110
 2090  IF P(A2) = 1 THEN P(25) = P(25) + 1:P(A2) =  - 1: GOSUB 2140: GOSUB 2920:
 GOTO 2110
 2100 P(A2) = P(A2) - 1: GOSUB 2140: GOSUB 2920
 2110  IF B3 = 0 THEN C$ =  STR$ (B5):B1 = 1: GOTO 2150
 2120 D3 = D3 - 1: IF D3 = 0 THEN B4 = 0: GOTO 360
 2130  GOTO 760
 2140  PRINT "FROM--";A4;"  TO--";A2: RETURN
 2150  IF (A7 < 7 AND P1 = 0) OR (P2 = 0 AND A5 > 18) THEN B$ = "B A C K G A M M
 O N"
 2160  IF P1 = 0 OR P2 = 0 THEN B$ = "G A M M O N"
 2170  IF B1 = 1 THEN  PRINT ""
 2180  IF C$ <  > NA$ THEN C$ = "ME"
 2190  PRINT "  THE WINNER IS ";C$: PRINT " PRESS Q TO QUIT": GET A$: IF A$ = "Q
" THEN  END
 2200  RUN
 2210  END
 2220  PRINT " BLOCKED ":B4 = 1 - B4: RETURN
 2230  PRINT : PRINT "INVALID MOVE": RETURN
 2240  PRINT "FROM-";: GET A$: PRINT A$;
 2250 A =  VAL (A$): IF A > 2 THEN ZZ = A: GOTO 2290
 2260  GET B$: PRINT B$;
 2270 B =  VAL (B$): IF B$ = " " OR B$ =  CHR$ (13) THEN ZZ = A: GOTO 2290
 2280 ZZ = A * 10 + B
 2290  IF ZZ < 1 OR ZZ > 24 THEN 2240
 2300  PRINT
 2310  RETURN
 2320  PRINT "  TO-";: GET A$: PRINT A$;
 2330 A =  VAL (A$): IF A > 2 OR A4 < 9 THEN ZZ = A: GOTO 2370
 2340  GET B$: PRINT B$;
 2350 B =  VAL (B$): IF B$ = " " OR B$ =  CHR$ (13) THEN ZZ = A: GOTO 2390
 2360 ZZ = A * 10 + B
 2370  IF ZZ < 0 OR ZZ > 24 THEN 2320
 2380  PRINT
 2390  RETURN
 2400  FOR I = 2048 TO 2277
 2410  READ X: POKE I,X: NEXT
 2420  REM    ** TABLE HEADER **
 2430  DATA  12,0,32,0,45,0,63,0,79,0,92,0,107,0,124,0,140,0,157,0,170,0, 189,0,
205,0,228,0,5,0,5,0
 2440  REM    ** SHAPE #1 (1)
 2450  DATA  41,45,229,35,36,36,23,23,77,145,82,0
 2460  REM    ** SHAPE #2 (2)
 2470  DATA  0,41,45,229,27,12,5,193,5,193,60,193,63,30,149,146,73,1,0
 2480  REM    ** SHAPE #3 (3)
 2490  DATA  1,193,4,193,193,96,45,21,190,43,21,246,27,45,13,0
 2500  REM    ** SHAPE #4 (4)
 2510  DATA  73,33,44,28,36,188,23,23,46,109,145,0,0
 2520  REM    ** SHAPE #5 (5)
 2530  DATA  1,193,21,45,12,36,28,63,39,44,45,173,146,18,0
 2540  REM    ** SHAPE #6 (6)
 2550  DATA     9,45,5,193,228,63,151,36,36,5,193,45,21,149,146,0,0
 2560  REM    ** SHAPE #7 (7)
 2570  DATA  9,36,5,193,5,193,5,193,60,63,191,146,82,73,9,0
 2580  REM    ** SHAPE #8 (8)
 2590  DATA  1,193,100,45,5,193,228,63,23,118,73,50,222,43,109,0,0
 2600  REM    ** SHAPE #9 (9)
 2610  DATA  41,45,193,12,36,228,63,23,118,45,141,18,0
 2620  REM    ** SHAPE #10 (0)
 2630  DATA  1,193,36,36,5,193,45,21,54,54,7,193,193,184,23,22,45,13,0
 2640  REM    ** SHAPE #11 (BLACK PIP)
 2650  DATA  193,193,193,191,23,54,21,21,45,12,12,36,28,28,4,0
 2660  REM    ** SHAPE #12 (WHITE PIP)
 2670  DATA  36,44,46,46,54,55,55,63,60,60,36,37,37,22,62,21,53,12,44,7,1 93,5,0
,5,0
 2680  POKE 232,0: POKE 233,8
 2690  SCALE= 1: ROT= 0: HCOLOR= 7
 2700  DIM P(31),PX(25)
 2710 P(1) =  - 2:P(6) = 5:P(8) = 3:P(12) =  - 5:P(13) = 5:P(17) =  - 3:P(19) =
 - 5:P(24) = 2
 2720  FOR I = 1 TO 24: READ PX(I): NEXT
 2730  DATA    20,40,60,80,100,120,160,180,200,220,240,260,260,240,220,200, 180,
160,120,100,80,60,40,20
 2740  HGR
 2750  HCOLOR= 3: FOR I = 0 TO 2: HPLOT 0 + I,0 + I TO 279 - I,0 + I TO 279 - I,
159 - I TO 0 + I,159 - I TO 0 + I,0 + I: NEXT
 2760  FOR I = 130 TO 133: HPLOT I,0 TO I,159: NEXT : FOR I = 147 TO 150: HPLOT
I,0 TO I,159: NEXT
 2770  FOR I = 1 TO 24
 2780  GOSUB 2860
 2790 Y = 10: IF I > 12 THEN Y = 155
 2800  IF S2 THEN  DRAW S1 AT PX(I) - 6,Y: DRAW S2: GOTO 2820
 2810  DRAW S1 AT PX(I) - 3,Y
 2820  IF Y = 10 THEN  HPLOT PX(I),12 TO PX(I),70
 2830  IF Y = 155 THEN  HPLOT PX(I),146 TO PX(I),88
 2840  NEXT
 2850  HPLOT 0,146 TO 279,146: HPLOT 0,12 TO 279,12
 2860 S1 =  INT (I / 10)
 2870  IF  NOT S1 THEN 2900
 2880 S2 = I - (S1 * 10): IF  NOT S2 THEN S2 = 10
 2890  GOTO 2910
 2900 S1 = I:S2 = 0
 2910  RETURN
 2920  FOR I = 1 TO 24
 2930  IF I < 13 THEN  HCOLOR= 0: DRAW 12 AT PX(I),12 + 7 * ( ABS (P(I)) + 1): H
COLOR= 7: GOTO 2950
 2940  HCOLOR= 0: DRAW 12 AT PX(I),146 - 7 * ( ABS (P(I)) + 1): HCOLOR= 7
 2950  IF I > 12 THEN  HPLOT PX(I),146 TO PX(I),88
 2960  IF I < 13 THEN  HPLOT PX(I),12 TO PX(I),70
 2970  IF P(I) = 0 THEN 3050
 2980 SH = 12:NP = P(I): IF P(I) < 0 THEN SH = 11:NP = 0 - NP
 2990 Y = 19: IF I > 12 THEN Y = 139
 3000  FOR P = 1 TO NP
 3010  HCOLOR= 0: DRAW 12 AT PX(I),Y: HCOLOR= 7
 3020  DRAW SH AT PX(I),Y
 3030 Y = Y + 7: IF Y > 70 THEN Y = Y - 14
 3040  NEXT
 3050  NEXT
 3060  IF P(25) = 0 THEN 3090
 3070  FOR I = 1 TO P(25): DRAW 12 AT 140,12 + 7 * I: NEXT
 3080  HCOLOR= 0: DRAW 12 AT 140,12 + 7 * (P(25) + 1): HCOLOR= 7
 3090  IF P(0) = 0 THEN 3120
 3100  FOR I = 1 TO P(0): DRAW 11 AT 140,146 - 7 * I: NEXT
 3110  HCOLOR= 0: DRAW 12 AT 140,146 - 7 * (P(0) + 1)
 3120 B2 = 0:B3 = 0
 3130  FOR X = 1 TO 25: IF P(X) > 0 THEN B2 = B2 + (P(X) * X)
 3140  NEXT
 3150  FOR X = 1 TO 25
 3160  IF P(X) < 0 THEN B3 = B3 + ( ABS (P(X)) * (25 - X))
 3170  NEXT
 3180  HCOLOR= 0: DRAW 12 AT 140,12 + 7 * (P(25) + 1): DRAW 12 AT 140,146 - 7 *
(P(0) + 1)
 3190  FOR X = 25 TO 1 STEP  - 1: IF  SGN (P(X)) = 1 THEN A5 = X: GOTO 3210
 3200  NEXT
 3210  FOR X = 24 TO 19 STEP  - 1: IF P(X) <  - 1 THEN A1 = A1 + 1: GOTO 3230
 3220  NEXT X
 3230  FOR X = 1 TO 18: IF  SGN (P(X)) =  - 1 THEN A9 = A9 + P(X): GOTO 3250
 3240  NEXT X
 3250  FOR X = 1 TO 24: IF  SGN (P(X)) =  - 1 THEN A7 = X: GOTO 3270
 3260  NEXT
 3270  POKE 33,39: HOME : VTAB 23: HTAB 26: PRINT NA$;" ";B2;" ": HTAB 26: PRINT
 "ME ";B3;" ": HTAB 26: PRINT "DICE ";A8;: IF A6 = A8 AND D1 <  > D2 THEN  PRINT
 : GOTO 3290
 3280  PRINT ":";A6
 3290  POKE 33,25: RETURN
 SAVE BACKGAMMON