r+pasch_sss.tap
r+pasch_sss.z80
Zeichensatz UTF-8+Z1013()+CTRL()-ohne Umlaute(äöüß)

    0!RVB BASIC-MIX1
    1 CLEAR 56:A1$="KLEINCOMPUTER robotron KC85/1 & KC87"
    2 A2$="SPIEL":A9=2
    4 A3$="R+PASCH"
    6 A4$="PASCH"
    8 A5$="EIN WUERFELSPIEL"
   10!AUTOR:SCHROETER
   17 I=RND(-ABS(DEEK(30)/65536))
   18 BORDER A9:INK 8:PAPER 1:GOSUB 160
   90 GOSUB 100:GOTO 2000
  100 PRINT AT(2,2);A1$:PRINT AT(4,2);"",STRING$(34,""),""
  102 PRINT AT(5,2);"":PRINT AT(5,37);""
  104 PRINT AT(6,2);"",STRING$(34,""),""
  106 PRINT AT(5,3);A2$:PRINT INK 3;AT(5,29);A3$
  108 INK A9:PRINT AT(8,2);STRING$(36,"")
  110 FOR I=9 TO 13:PRINT AT(I,2);"":PRINT AT(I,37);"":NEXT I
  112 PRINT AT(14,2);STRING$(36,"")
  114 INK 8:PRINT AT(10,36-LEN(A4$));A4$:PRINT AT(12,36-LEN(A5$));A5$
  116 INK 3:PRINT AT(18,2);"VEB ROBOTRON-MESSELEKTRONIK"
  118 PRINT AT(20,2);">OTTO SCHOEN< DRESDEN":INK 8
  120 PRINT INK 4;AT(22,31);">ENTER<"
  124 IF PEEK(36)=13 THEN PRINT AT(20,27);STRING$(11," "):RETURN:ELSE 124
  160 WINDOW:CLS:PRINT AT(0,0);" ":RETURN
  200 L=4*J-3:FOR K=0 TO 3:PRINT AT(L+K,35);"    ":NEXT K:PAUSE 1
  203 PRINT AT(L,35);"":FOR K=1 TO 3
  204 PRINT AT(L+K,35);D$(W(J),K):NEXT K:RETURN
  250 WINDOW 23,23,0,38:CLS:INPUT "WELCHE WUERFEL BLEIBEN STEHEN ?";A$
  251 FOR L=1 TO 5:K(L)=0:NEXT L
  252 IF LEN(A$)=0 OR LEN(A$)>5 THEN 250
  253 IF LEFT$(A$,1)="A"AND LEN(A$)<>2 THEN 250
  254 IF A$="N"THEN RETURN
  255 IF A$="G"THEN K(1)=1:K(2)=1:K(3)=1:K(4)=1:K(5)=1:RETURN
  256 IF LEFT$(A$,1)<>"A"THEN K=0:GOTO 260
  257 C=INSTR(RIGHT$(A$,1),"123456"):IF C=0 THEN 250
  258 FOR K=1 TO 5:IF W(K)=C THEN K(K)=1
  259 NEXT K:RETURN
  260 K=K+1:C=INSTR(MID$(A$,K,1),"123456"):IF C=0 THEN 250
  261 FOR L=1 TO 5:IF K(L)=0 AND W(L)=C THEN K(L)=1:L=6 
  262 NEXT L:IF L=6 THEN 250
  263 IF K=LEN(A$)THEN RETURN:ELSE 260
  270 M=0:IF C<7 THEN FOR K=1 TO 5:M=M-C*(W(K)=C):NEXT K:RETURN
  271 IF C=16 THEN M=W(1)+W(2)+W(3)+W(4)+W(5):RETURN
  272 IF C<>13 AND C<>14 THEN 276
  273 FOR K=1-(C=14)TO 5-(C=14):FOR L=1 TO 5:M=M-K*(W(L)=K):NEXT L:NEXT K
  274 IF C=13 AND M<>15 THEN M=0:RETURN
  275 IF C=14 AND M<>20 THEN M=0:RETURN:ELSE RETURN
  276 FOR K=1 TO 6:Z(K)=0:FOR L=1 TO 5:Z(K)=Z(K)-(W(L)=K):NEXT L:NEXT K
  277 IF C<>9 AND C<>11 AND C<>12 THEN 280
  278 Y=C-8+(C>10):FOR K=6 TO 1 STEP-1:M=M-K*(Y+1)*(Z(K)>Y)
  279 K=-K*(Z(K)<=Y)-(Z(K)>Y):NEXT K:RETURN
  280 IF C=17 AND(Z(1)=5 OR Z(2)=5 OR Z(3)=5 OR Z(4)=5 OR Z(5)=5 OR Z(6)=5)THEN M=50
  281 IF C=17 THEN RETURN
  282 FOR K=1 TO 6:M=M-(Z(K)<>2 AND Z(K)<>3 AND Z(K)<>0 AND Z(K)<>5):NEXT K
  283 IF C=15 AND M<>0 THEN M=0:RETURN
  284 IF M=0 AND C=15 THEN M=W(1)+W(2)+W(3)+W(4)+W(5):RETURN
  285 M=0:FOR K=6 TO 1 STEP-1:M=M-2*K*(Z(K)>1):Y=K:K=-K*(Z(K)<2)+1*(Z(K)>1)
  286 Z(Y)=Z(Y)+2*(Z(Y)>1):NEXT K:IF M=0 THEN RETURN
  287 Y=M:FOR K=6 TO 1 STEP-1:M=M-2*K*(Z(K)>1):NEXT K:IF Y=M THEN M=0:RETURN:ELSE RETURN
  290 CLS:INPUT "WO TRAGEN SIE DEN WURF EIN ?";A$:IF LEN(A$)<>2 THEN 290
  291 C=0:FOR K=1 TO 18:IF A$=T$(K)THEN C=K
  292 NEXT K:IF C=0 OR C=7 OR C=8 OR C=18 OR F(I,C)<>-1 THEN 290
  293 GOSUB 270:F(I,C)=M:GOSUB 300:IF C<7 THEN F(I,7)=F(I,7)+M:C=7:M=F(I,7):GOSUB 300
  294 IF C=17 AND M=50 THEN BEEP:PAUSE 1:BEEP:PAUSE 1:BEEP
  297 IF F(I,7)>=63 AND F(I,8)=-1 THEN C=8:F(I,8)=50:M=50:GOSUB 300:BEEP
  298 RETURN
  300 L=C+2-(C>6)-(C>8)-(C>17)
  301 IF M<>0 THEN PRINT AT(L,I*5-2);RIGHT$(" "+STR$(M),3):RETURN
  302 PRINT INK 3;AT(L,I*5-1);"":RETURN
 2000 WINDOW:BORDER 1:PAPER 1:CLS:INK 2:PRINT AT(9,8);"",STRING$(23,""),""
 2010 FOR I=10 TO 12:PRINT AT(I,8);"":PRINT AT(I,32);"":NEXT I
 2020 PRINT AT(13,8);"",STRING$(23,""),"":INK 3
 2030 PRINT AT(11,13);"SPIELERANZAHL ?":WINDOW 22,22,27,38:INPUT "(1...6)";S
 2040 IF S<>INT(S)OR S<1 OR S>6 THEN 2030
 2080 DIM F(S,18),T$(18),N$(S),W(5),K(5),D$(6,3)
 2090 PRINT AT(11,12);"  SPIELERNAMEN":WINDOW 22,22,18,38:CLS:FOR I=1 TO S
 2100 PRINT "SPIELER";I;:INPUT ":";A$:N$(I)=LEFT$(A$+"   ",4):NEXT I
 2120 FOR J=1 TO 18:READ T$(J):FOR I=1 TO S:F(I,J)=-1:F(I,7)=0:NEXT I:NEXT J
 2125 FOR I=1 TO 6:FOR J=1 TO 3:READ D$(I,J):NEXT J:NEXT I
 2130 DATA "Z1","Z2","Z3","Z4","Z5","Z6","ZS","BO","1P"
 2140 DATA "2P","3G","4G","KL","GR","KU","CH","PA","GS"
 2143 DATA "","","","","","","","",""
 2146 DATA "","","","","","","","",""
 2150 WINDOW:CLS:INK 6:FOR I=0 TO 31:PRINT AT(2,I);"":PRINT AT(9,I);""
 2160 PRINT AT(12,I);"":NEXT I
 2180 FOR I=2 TO 32 STEP 5:FOR J=0 TO 21:PRINT AT(J,I);"":NEXT J:NEXT I
 2190 C=2:FOR I=1 TO 17:C=C+1:PRINT INK 8,PAPER 5;AT(C,0);T$(I)
 2200 IF I=6 OR I=8 THEN C=C+1
 2210 NEXT I:FOR I=1 TO S:PRINT INK 3,PAPER 2;AT(0,5*I-2);N$(I):NEXT I
 2230 FOR R=1 TO 15:FOR I=1 TO S:FOR J=1 TO 22:INK 2:PRINT AT(J,I*5-3);"*"
 2240 PRINT AT(J,I*5+2);"*":NEXT J:PRINT AT(1,I*5-2);"****":PRINT AT(22,I*5-2);"****"
 2250 PAPER 1:INK 3:PRINT INK 4;AT(0,34);"1.WURF"
 2260 X=1:FOR J=1 TO 5:W(J)=INT(RND(1)*6+1):K(J)=0:GOSUB 200:NEXT J
 2280 GOSUB 250
 2290 IF K(1)+K(2)+K(3)+K(4)+K(5)=5 THEN 2350
 2300 X=2:PRINT INK 4;AT(0,34);"2":FOR J=1 TO 5:IF K(J)=0 THEN W(J)=INT(RND(1)*6+1):GOSUB 200
 2310 NEXT J:GOSUB 250
 2320 IF K(1)+K(2)+K(3)+K(4)+K(5)=5 THEN 2350
 2330 PRINT INK 4;AT(0,34);"3":FOR J=1 TO 5:IF K(J)=0 THEN W(J)=INT(RND(1)*6+1):GOSUB 200
 2340 NEXT J
 2350 GOSUB 290
 2570 INK 6:PRINT AT(1,I*5-2);"    ":PRINT AT(22,I*5-3);"      ":FOR J=1 TO 21
 2580 PRINT AT(J,I*5-3);"":PRINT AT(J,I*5+2);"":NEXT J
 2600 NEXT I:NEXT R
 2605 WINDOW 0,23,33,39:CLS:WINDOW
 2610 PRINT INK 8,PAPER 2;AT(23,0);"GS":FOR I=1 TO S:M=0
 2615 IF F(I,8)=-1 THEN F(I,8)=0:C=8:GOSUB 300
 2620 FOR J=7 TO 17:M=M+F(I,J):NEXT J:F(I,18)=M:C=18:INK 2:GOSUB 300:FOR J=1 TO 5
 2630 IF M>Z(J)THEN FOR K=5 TO J STEP-1:Z(K+1)=Z(K):NEXT K:Z(J)=M:M=-1:J=7
 2635 NEXT J:IF M<>-1 THEN Z(6)=M
 2637 NEXT I:INK 8:PAPER 2
 2640 FOR I=1 TO S:PRINT AT(1,5*I-2);"    "
 2650 FOR J=6 TO 2 STEP-1:IF F(I,18)=Z(J)THEN PRINT AT(1,5*I-2);J:PRINT AT(1,5*I);"."
 2660 NEXT J:IF F(I,18)=Z(1)THEN PRINT AT(1,5*I-2);"SIEG"
 2670 NEXT I:CLEAR:PAPER 1:INK 3:END
 9000!ENDE PASCH !