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

    0!RVB BASIC-MIX2
    1 CLEAR 512:A1$="KLEINCOMPUTER robotron KC85/1 & KC87"
    2 A2$="SPIEL":A9=2 
    4 A3$="R+FLOHSP"
    6 A4$="DAS LUSTIGE FLOHSPRINGEN"
    8 A5$="EIN GESELLSCHAFTSSPIEL"
   10! AUTOR:SCHROETER
   18 BORDER A9:INK 8:PAPER 1:WINDOW:CLS
   90 GOSUB 100:GOTO 1000
  100 PRINT AT(0,0);" ":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<"
  122 IF PEEK(36)<>13 THEN 122:ELSE RETURN
  500 X(I)=INT(19*RND(1)+1):Y(I)=INT(35*RND(1)+4):F(I)=INT((I-1)/4+2):K(I)=0
  501 R(I)=0:Z=0:FOR J=1 TO 4*S:Z=Z-(I<>J AND X(I)=X(J)AND Y(I)=Y(J)):NEXT J
  502 IF Z<>0 THEN 500
  503 INK F(I):IF R(I)<>0 THEN RETURN
  504 PRINT AT(X(I),Y(I));A$(I):RETURN
  510 WINDOW:PRINT AT(0,0);" ":PAUSE 30:RETURN
  530 PRINT "   BEUTE: ";:FOR J=1 TO 4*S:IF R(J)=K+1 THEN INK F(J):PRINT A$(J);
  534 NEXT J:PRINT:RETURN
  540 FOR J=1 TO 4:I=(K-1)*4+J:INK K+1:IF R(I)=0 THEN PRINT LEFT$(STR$(J),2);:GOSUB 550
  541 NEXT J:INK K+1:GOSUB 560:WINDOW 22,23,2,39:CLS:GOSUB 570:Q=1
  543 IF X>=1 AND X<=19 AND Y>=3 AND Y<=38 THEN GOSUB 580:RETURN
  544 IF X>=0 AND X<=20 AND Y>=0 AND Y<=39 THEN Q=0:GOSUB 590
  545 IF Q=0 THEN RETURN:ELSE GOSUB 600:RETURN
  550 IF K(I)=0 THEN RETURN:ELSE P=I:H=I
  553 O=K(P):INK F(O):PRINT A$(O);:IF K(O)=0 THEN I=H:INK F(I):RETURN:ELSE P=O:GOTO 553
  560 PRINT AT(23,2);"MIT WELCHEM FLOH SPRINGEN SIE ?":WINDOW:PRINT AT(0,0);" "
  561 FOR J=1 TO 4:I=(K-1)*4+J:INK F(I)
  562 IF R(I)=0 THEN PRINT AT(X(I),Y(I));MID$(STR$(J),2,1)
  563 NEXT J:PAUSE 2:FOR J=1 TO 4:I=(K-1)*4+J:IF R(I)=0 THEN PRINT AT(X(I),Y(I));A$(I)
  564 NEXT J:T$=INKEY$:IF T$=""THEN 561:ELSE I=ASC(T$)-48
  565 IF I<1 OR I>4 THEN 561:ELSE IF R((K-1)*4+I)<>0 THEN 561
  566 I=I+(K-1)*4:RETURN
  570 WINDOW 23,23,2,39:CLS:PRINT "UNTER WELCHEM WINKEL ";
  571 INPUT W:CLS:W=W*PI*2/360
  572 PRINT "UEBER WELCHE DISTANZ (";SG;CHR$(8);"-40) ";
  573 INPUT D:CLS:IF D<SG OR D>50 THEN 572
  574 X=X(I)-INT(SIN(W)*D+.5):Y=Y(I)+INT(COS(W)*D+.5)
  575 WINDOW:PRINT AT(0,0);" ":PRINT AT(X(I),Y(I));" ":RETURN
  580 X(I)=X:Y(I)=Y:INK F(I):PRINT AT(X,Y);A$(I):P=I
  581 O=K(P):IF O=0 THEN 583
  582 X(O)=X:Y(O)=Y:P=O:GOTO 581
  583 FOR O=1 TO 4*S
  584 IF X(O)<>X(I)OR Y(O)<>Y(I)OR R(O)<>0 THEN 588
  585 IF F(O)=F(I)AND O<>I THEN GOSUB 620:RETURN
  586 IF F(O)=F(I)THEN 588
  587 IF R(O)=0 THEN GOSUB 610:RETURN
  588 NEXT O:RETURN
  590 R=PEEK(-5120+40*X+Y):IF CHR$(R)=B$(INT((I-1)/4))THEN 630
  594 IF R=32 THEN Q=1:RETURN
  595 IF(R>200 AND R<205)OR R=207 OR R=166 THEN 640:ELSE 660
  600 INK F(I):WINDOW 21,23,2,39:CLS:PRINT "DAS GING INS AUSSEITS":BEEP
  601 IF K(I)<>0 THEN 603:ELSE PRINT "SIE VERLIEREN DIESEN FLOH"
  602 R(I)=10:K(I)=0:T=2:GOSUB 510:RETURN
  603 PRINT "SIE VERLIEREN DEN TURM":GOSUB 510:H=I:R=K(I):GOSUB 500
  604 I=R:R=K(I):IF F(H)=F(I)THEN R(I)=10:K(I)=0:GOTO 606
  605 GOSUB 500
  606 IF R=0 THEN I=H:T=2:RETURN
  607 GOTO 604
  610 WINDOW 22,23,2,39:CLS
  611 PRINT:PRINT "GENAU GETROFFEN!!!";:BEEP:GOSUB 510
  612 K(P)=O:R(O)=1:RETURN
  620 WINDOW 22,23,2,39:CLS:PRINT "DAS WAR EIN EIGENER FLOH"
  621 PRINT "SIE HABEN WOHL GENUG DAVON!?";
  622 BEEP:GOSUB 510:GOTO 612
  630 INK F(I):PRINT AT(23,2);"DIESER FLOH HAT SEINEN HOF ERREICHT":BEEP
  631 PAPER F(I):INK 1:PRINT AT(X,Y);"":R=K(I):PAPER 1:PAUSE 30:GOSUB 500
  632 PRINT PAPER F(I);AT(X,Y);B$(INT((I-1)/4)):IF R=0 THEN T=2:RETURN
  633 WINDOW 23,23,2,39:CLS:H=I
  634 I=R:F=F(I):IF F(H)=F THEN 636:ELSE R=K(I):R(I)=F(H):BEEP
  635 PRINT AT(23,2);"BEUTEFLOH:  ":INK F:PRINT AT(23,14);A$(I):GOSUB 510:GOTO 637
  636 PRINT AT(23,2);"FLOH BEFREIT!":BEEP:R=K(I):GOSUB 500:GOSUB 510
  637 IF R=0 THEN I=H:T=2:RETURN
  638 INK F(H):GOTO 634
  640 INK F(I):WINDOW 21,23,2,39:CLS:PRINT "DAS WAR EIN FREMDER HOF!":BEEP:GOTO 601
  650 INK K+1:FOR J=4*K-3 TO 4*K:IF R(J)<2 THEN 655
  651 NEXT J:SA=SA+1:A(K)=SA
  652 PRINT "SCHEIDET LEIDER AUS":GOSUB 510
  653 FOR J=4*K-3 TO 4*K:X(J)=0:NEXT J:RETURN
  655 PRINT "MUSS ABWARTEN, BIS WIEDER FLOEHE"
  656 PRINT "FREI WERDEN!";
  657 GOSUB 510:RETURN
  660 INK F(I):WINDOW 21,23,2,39:CLS:PRINT "BEGRENZUNG GETROFFEN":BEEP
  661 R=PEEK(-5120+40*X+Y)
  662 FOR J=1 TO 10:INK F(I):PRINT AT(X,Y);A$(I):PAUSE 2:INK 8
  663 PRINT AT(X,Y);CHR$(R):PAUSE 2:NEXT J
  664 INK F(I):GOTO 601
 1000 BORDER 1:PAPER 1:CLS:INK 2:SA=0
 1010 DIM A$(24):PRINT AT(10,4);"",STRING$(28,""),""
 1020 FOR I=11 TO 13:PRINT AT(I,4);"":PRINT AT(I,33);"":NEXT I
 1030 PRINT AT(14,4);"",STRING$(28,""),"":INK 3
 1040 PRINT AT(12,6);"ANZAHL DER FLOHKUENSTLER ?"
 1050 WINDOW 22,22,30,39:CLS:INPUT "(2...6)";S
 1060 S=INT(S):IF S<2 OR S>6 THEN 1050
 1070 FOR I=1 TO S:WINDOW:PRINT AT(12,6);" NAMEN DER FLOHSPRINGER ?  "
 1080 WINDOW 22,22,27,39:CLS:INK I+1:INPUT N$(I):INK 3:NEXT I:WINDOW
 1110 INK 3:PRINT AT(12,6);"   SCHWIERIGKEITSGRAD ?  "
 1120 WINDOW 22,22,28,39:CLS:INPUT "(1...20)";SG
 1130 IF SG<1 OR SG>20 THEN 1120
 1140 DIM A(S),B(S),G(S)
 1150 WINDOW:DIM X(4*S):DIM Y(4*S):DIM F(4*S):DIM K(4*S):DIM R(4*S):INK 8:CLS
 1155 PRINT AT(0,0);" ":PRINT INK 1;AT(12,6);"BITTE EINE >1< EINGEBEN!"
 1160 PRINT AT(22,30);">ENTER<":A$=INKEY$:IF A$=""THEN 1160
 1162 IF A$="1"THEN SW=1
 1164 IF A$<>"1"AND A$<>CHR$(13)THEN 1155
 1170 CLS:PRINT AT(0,0);" ":PRINT AT(0,2);"",STRING$(36,""),""
 1180 FOR I=1 TO 19:PRINT AT(I,2);"":PRINT AT(I,39);"":NEXT I
 1190 PRINT AT(20,2);"",STRING$(36,""),""
 1200 V=INT(1.5*(6-S)+1):PRINT INK 8;AT(V,0);"":FOR I=0 TO S-1
 1210 B$(I)=CHR$(-(I+201)*(I<4)-207*(I=4)-166*(I=5)):FOR J=1 TO 2
 1240 PRINT INK 8;AT(3*I+J+V,0);"":INK I+2:PAPER I+2:PRINT AT(3*I+J+V,1);B$(I),B$(I)
 1260 PRINT AT(3*I+J+V,1);B$(I),B$(I):PAPER 1:NEXT J
 1280 PRINT INK 8;AT(3*I+3+V,0);"":NEXT I
 1290 PRINT INK 8;AT(3*I+V,0);"":FOR I=1 TO 4*S
 1300 A$(I)=CHR$(-((I-1)/4+201)*(I<17)-207*(I>16 AND I<21)-166*(I>20))
 1302 IF SW=0 THEN A$(I)=""
 1305 GOSUB 500:NEXT I
 1310 FOR K=1 TO S:IF X(4*K-3)=0 THEN 1440
 1330 INK K+1:WINDOW 21,23,2,39:CLS:IF SW=1 THEN PRINT B$(K-1);" ";
 1360 PRINT N$(K);" ";:GOSUB 530:Z=0:FOR J=1 TO 4:I=(K-1)*4+J
 1400 IF R(I)=0 THEN Z=Z+1
 1410 NEXT J:IF Z=0 THEN GOSUB 650:GOTO 1440:ELSE GOSUB 540
 1440 NEXT K:IF SA<S-1 THEN 1310
 1460 WINDOW:CLS:PRINT AT(0,0);" ":PRINT INK 2;AT(2,8);"ENDAUSWERTUNG"
 1470 PRINT INK 4;AT(6,21);"AUS BEUTE  WERTUNG"
 1480 FOR I=1 TO 4*S:IF R(I)>1 AND R(I)<8 THEN B(R(I)-1)=B(R(I)-1)+1
 1500 NEXT I:FOR I=1 TO S:IF X(I*4-3)<>0 THEN A(I)=S
 1505 G(I)=A(I)*2+B(I):NEXT I
 1510 FOR I=1 TO S:K=7+2*I:PRINT INK 4;AT(K,0);"PLATZ",I,": ":M=0:FOR J=1 TO S
 1520 IF G(J)>M THEN M=G(J):N=J:T=A(J):ELSE IF G(J)=M AND A(J)>T THEN M=G(J):N=J:T=A(J)
 1530 NEXT J:PRINT INK N+1;AT(K,10);N$(N):PRINT INK 3;AT(K,21);A(N)
 1540 PRINT INK 3;AT(K,26);B(N):PRINT INK 3;AT(K,33);G(N):G(N)=0:NEXT I
 1550 GOSUB 120:WINDOW:CLS:PRINT INK 3;AT(8,6);"AUF WIEDERSEHEN!":PAUSE 50:CLS:END
 9000!ENDE FLOHSP