1PRINT"COMPETITIVE LIFE, YOU MUST KNOW THE RULES TO PLAY"
2 REM *** WRITTEN BY BRIAN WYVILL, UNIV OF BRADFORD, ENGLAND
3 DATA 3,102,103,120,130,121,112,111,12
4 DATA 21,30,1020,1030,1011,1021,1003,1002,1012
5 DIM N1(6,6),K1(18),A1(16),X(2),Y(2)
6 REMARKABLY TRANSLATED TO OS8 BASIC BY KAY R. FISHER ...DEC
10 FORM=1TO18\READK1(M)\NEXTM
13 DATA-1,0,1,0,0,-1,0,1,-1,-1,1,-1,-1,1,1,1
14 FORO1=1TO16\READA1(O1)\NEXTO1
20 GOTO500
50 FORJ=1TO5
51 FORK=1TO5
55 IFN1(J,K)>99 GOTO 56\GOTO 60
56 GOSUB 200
60 NEXTK
65 NEXTJ
90 LETK=0\LETM2=0\LETM3=0
99 FORJ=0TO6\PRINT
100 FORK=0TO6
101 IF J=0 GOTO 102\IF J<>6 GOTO 105
102 IFK<>6 GOTO 103\PRINT 0;\GOTO 125
103 PRINTK;\GOTO120
105 IF K=0 GOTO 106\IF K<>6 GOTO 110
106IF J<>6 GOTO 107\PRINT 0;\GOTO 126
107 PRINTJ;\GOTO120
110 GOSUB300
120 NEXTK
125 NEXTJ
126 RETURN
200 LETB=1\IFN1(J,K)=<999 GOTO 220\B=10
220 FORO1=1TO15STEP2
230 LETN1(J+A1(O1),K+A1(O1+1))=N1(J+A1(O1),K+A1(O1+1))+B
231 NEXTO1
239 RETURN
300 IFN1(J,K)<3THEN399
305 FORO1=1TO18
310 IFN1(J,K)=K1(O1)THEN350
315 NEXTO1
320 GOTO399
350 IFO1>9THEN360
351 LETN1(J,K)=100\LETM2=M2+1\PRINT" * ";
355 RETURN
360 LET N1(J,K)=1000\LET M3=M3+1\PRINT" # ";
365 RETURN
399 LETN1(J,K)=0\PRINT"   ";\RETURN
500 PRINT"SET UP THE BOARD"\PRINT"AND LET'S PLAY..."\PRINT
505 LETM2=0\LETM3=0
510 FORJ=1TO5
511 FORK=1TO5
515 LETN1(J,K)=0
516 NEXTK
517 NEXTJ
519 FORB=1TO2\LETP1=3\IFB<>2 GOTO 520\P1=30
520 PRINT"PLAYER";B;"3 LIVE PIECES"
535 FORK1=1TO3\GOSUB700
540 LETN1(X(B),Y(B))=P1\NEXTK1
542 NEXTB
559 GOSUB90
560 PRINT\GOSUB50
570 IF M2<>0 GOTO 571\IFM3=0GOTO 574
571 IFM3<>0 GOTO 572\B=1\GOTO 574
572 IFM2<>0 GOTO 573\B=2\GOTO 575
573 GOTO580
574 PRINT\PRINT "A DRAW GAME"\GOTO 1
575 PRINT\PRINT "PLAYER";B;"IS THE WINNER"\RESTORE\GOTO 1
580 FORB=1TO2\PRINT\PRINT"PLAYER";B;\GOSUB700
581 IFB=99THEN560
582 NEXTB
586 LETN1(X(1),Y(1))=100\LETN1(X(2),Y(2))=1000
596 GOTO 560
700 PRINT "X,Y"\INPUT Y(B),X(B)
705 IFX(B)>5 GOTO 706\IFX(B)>0 GOTO 708
706 GOTO750
708 IFY(B)>5 GOTO 710\IF Y(B)>0 GOTO 715
710 GOTO750
715 IFN1(X(B),Y(B))<>0THEN750
720 IFB<>1 GOTO 725\RETURN
725 IF X(1)<>X(2) GOTO 730\IF Y(1)=Y(2) GOTO 740
730 RETURN
740 PRINT"SAME COORD. SET TO 0"
741 N1(X(B)+1,Y(B)+1)=0\B=99\RETURN
750 PRINT"ILLEGAL COORDS. RETYPE"\GOTO 700
900 END
