Google
 

Trailing-Edge - PDP-10 Archives - -
There are no other files named in the archive.
        DIMENSION ARRAY(3,3),I(10),J(10)
        TYPE 1
1       FORMAT(' THIS IS THE GAME OF JOTTO')
10      TYPE 2
2       FORMAT(' PICK A NUMBER FROM 1 TO 20    >'$)
        ACCEPT 3,INUM
3       FORMAT(I)
        PC=0
        G=0
        P=0
        ICOUNT=0
        JCOUNT=0
        DO 4 IA=1,INUM
        IX=2
4       CONTINUE
        TYPE 5
5       FORMAT(' DO YOU WANT RULES? (1) YES, (0) NO    >'$)
        ACCEPT 6,IYES
6       FORMAT(I)
        IF(IYES)7,20,7
7       TYPE 8
8       FORMAT(' THE COMPUTER PICKS A THREE LETTER WORD.  YOU ARE
        1 TO GUESS THE WORD BY TYPING IN THREE LETTER PROBE WORDS.
        2 IF THE PROBE WORD HAS ONE OR THREE LETTERS THAT MATCH
        3 THE COMPUTERS WORD, THE COMPUTER WILL TYPE
        4 BACK "ODD".  IF THE PROBE WORD HAS 0 OR 2 LETTERS THAT 
        5 MATCH THE COMPUTERS WORD, THEN THE COMPUTER WILL
        6 TYPE BACK "EVEN".  WHEN YOU SEE "MOVE:" THYE 0
        7 FOR A PROBE WORD AND 1 FOR A GUESS.  A GUESS WILL BE RE-
}        8 QUIRED AFTER EVERY FIVE PROBE WORDS.  YOU HAVE 25
        9 PROBE WORDS AND/OR 5 GUESSES.  GOOD LUCK')
20      READ(20,30)(I(1),I(2),I(3),IB=1,IX)
30      FORMAT(60A1)
31      TYPE 32
32      FORMAT(' MOVE:'$)
        ACCEPT 33,K
33      FORMAT(I)
        IF(K)50,40,50
40      TYPE 9
9       FORMAT(' PROBE WORD: '$)
        ACCEPT 34,J(1),J(2),J(3)
34      FORMAT(3A1)
        P=P+1
        PC=PC+1
41      DO 42 N=1,3
        DO 42 M=1,3
        K=J(N)
        L=I(M)
        IF(K-L)42,60,42
60      ARRAY(N,M)=1
42      CONTINUE
        DO 43 N=1,3
        DO 44 M=1,3
        IF(ARRAY(N,M)-1)44,701,44
701     JCOUNT=JCOUNT+1
44      CONTINUE
        IF(JCOUNT-3)45,70,45
45      IF(JCOUNT-2)46,70,46
46      IF(JCOUNT-1)43,70,43
70      ICOUNT=ICOUNT+1
43      CONTINUE
        IF(ICOUNT-0)82,80,82
82      IF(ICOUNT-1)83,81,83
83      IF(ICOUNT-2)84,80,84
84      IF(ICOUNT-3)85,81,85
80      TYPE 71
71      FORMAT(' EVEN')
        GO TO 75
81      TYPE 72
72      FORMAT(' ODD')
        GO TO 75
85      TYPE 86
86     PFORMAT('ERROR')
        GO TO 602
75      IF(PC-5)210,50,210
210     IF(P-25)31,300,31
50      TYPE 51
51      FORMAT(' GUESS: '$)
        ACCEPT 34,J(4),J(5),J(6)
        IF(J(4)-I(1))200,110,200
110     IF(J(5)-I(2))200,120,200
120     IF(J(6)-I(3))200,130,200
130     TYPE 131
131     FORMAT(' GUESS IS CORRECT...YOU WIN!')
        GO TO 600
200     TYPE 201
201     FORMAT(' GUESS IS INCORRECT.')
        G=G+1
        PC=0
        IF(G-5)31,300,31
600     TYPE 601
601     FORMAT(' ANOTHER GAME? (1) YES, (0) NO    >'$)
        ACCEPT 6,IYES
        IF(IYES)10,602,10
300     TYPE 301, I(1),I(2),I(3)
301     FORMAT(' THE COMPUTER WINS...THE WORD WAS,3A1)
        GO TO 600
602     CALL EXIT
        END


EXIT
^C

.