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

   10 WINDOW:BORDER 4:PAPER 4:CLS:INK 1
   20 PRINT TAB(120)"MOECHTEN SIE GEGEN DEN COMPUTER"
   30 PRINT:INPUT "SPIELEN ?  WENN JA, TIPPE >COMP< ";C$
   40 PRINT:PRINT:INPUT "IHREN NAMEN BITTE : ";N$:PRINT
   50 IF C$="COMP"THEN C=1:CLS:GOTO 70
   60 PRINT:INPUT "BITTE DEN NAMEN DES 2.SPIELERS : ";N2$:CLS
   70 WINDOW 0,8,0,39:INK 6:PRINT TAB(15)"VIER GEWINNT":PRINT TAB(15)""
   80 INK 1:PRINT AT(2,0);" ":T$="":T1$="":Z$="":Z1$=""
   90!
  100 PRINT AT(11,0);T1$:PRINT AT(11,35);T1$
  110 FOR J=11 TO 20
  120 FOR I=5 TO 33 STEP 4
  130 PRINT INK 8;AT(J,I);T$:IF J=20 THEN READ M$:PRINT INK 1;AT(J,I+2);M$
  140 NEXT I
  150 NEXT J
  160 DATA "11","22","33","44","55","66","77",
  170 DIM B(76),P(45),T(45,4)
  180 FOR I=1 TO 76 
  190 B(I)=0:NEXT I
  200 FOR K=1 TO 45
  210 FOR L=1 TO 4
  220 READ T(K,L):NEXT L:NEXT K
  230 DATA 16,26,36,46,26,36,46,56,36,46,56,66,46,56,66,76
  240 DATA 15,25,35,45,25,35,45,55,35,45,55,65,45,55,65,75
  250 DATA 14,24,34,44,24,34,44,54,34,44,54,64,44,54,64,74
  260 DATA 13,23,33,43,23,33,43,53,33,43,53,63,43,53,63,73
  270 DATA 12,22,32,42,22,32,42,52,32,42,52,62,42,52,62,72
  280 DATA 11,21,31,41,21,31,41,51,31,41,51,61,41,51,61,71
  290 DATA 16,15,14,13,26,25,24,23,36,35,34,33,46,45,44,43,56,55,54,53
  300 DATA 66,65,64,63,76,75,74,73,15,14,13,12,25,24,23,22,35,34,33,32
  310 DATA 45,44,43,42,55,54,53,52,65,64,63,62,75,74,73,72,14,13,12,11
  320 DATA 24,23,22,21,34,33,32,31,44,43,42,41,54,53,52,51,64,63,62,61
  330 DATA 74,73,72,71
  340 WINDOW 4,8,0,39:CLS:IF G=42 THEN 450
  350 INK 2:PRINT "IN WELCHES FACH LEGT ";N$:PRINT
  360 F=0:INPUT "DEN NAECHSTEN CHIP ? ";F:CLS:PRINT AT(4,0);" ":INK 1
  370 IF F<1 OR F>7 THEN 340
  380 IF B(F*10+1)>0 THEN GOSUB 770:GOTO 340
  390!
  400! SPIELER1 LAEST RUTSCHEN
  410 G=G+1
  420 GOSUB 860:GOSUB 1230
  430 IF C=1 THEN PRINT SPC(5)"JETZT BIN ICH AN DRAN !":PRINT AT(5,0);" ":GOTO 1380
  440 CLS:IF G<42 THEN 500
  450 CLS:IF C=1 THEN 480 ELSE PRINT "ES HAT KEINER GEWONNEN ==> UNENTSCHIEDEN"
  460 INPUT "NOCHMAL (JA) ?";S$:IF S$="JA"THEN CLEAR 255:GOTO 10
  470 GOTO 2040
  480 PRINT "NOCH EINMAL DAVONGEKOMMEN !!!"
  490 GOTO 460
  500 INK 2:PRINT "IN WELCHES FACH LEGT ";N2$:PRINT
  510 X=0:INPUT "DEN NAECHSTEN CHIP ? ";X:CLS:PRINT AT(4,0);" ":INK 1
  520 IF X<1 OR X>7 THEN 440
  530 IF B(X*10+1)>0 THEN GOSUB 770:GOTO 440
  540 PRINT AT(8,0);" "
  550!
  560! SPIELER 2 RUTSCHT
  570!
  580 G=G+1
  590 GOSUB 1040:GOSUB 1230:GOTO 340
  600!
  610!
  620!    RECHNER: IST FELD NOCH FREI ?
  630!
  640!
  650 A=0:FOR I=1 TO 7
  660 IF B(I*10+1)=0 THEN 670 ELSE A=A+1:GOTO 680
  670 E=I
  680 NEXT I
  690 IF A=6 THEN X=E 
  700 FOR I=1 TO 7
  710 IF B(I*10+1)>0 THEN 750
  720 IF I<>X THEN 750
  730 PRINT:PRINT " MEIN CHIP GEHT IN FACH  ==>     ";X:PRINT AT(7,0);" "
  740 GOTO 580
  750 NEXT I
  760 GOTO 1380
  770!
  780!
  790!     FACH BESETZT
  800!
  810!
  820 CLS:PRINT TAB(5)"DAS FACH IST VOLL !!!
  830 PRINT AT(5,0);" ":PAUSE 30:RETURN
  840!
  850!
  860!
  870!
  880!       LINKER CHIP RUTSCHT
  890!
  900!
  910 FOR I=4 TO 4*F+2
  920 PRINT INK 3;AT(10,I);" "+Z$:PRINT INK 3;AT(10,0);Z1$
  930 GOSUB 2080
  940 NEXT I
  950 FOR L=1 TO 6
  960 IF B(F*10+L)>0 THEN 990
  970 NEXT L
  980 GOSUB 2080
  990 FOR J=10 TO 11+L
 1000 PRINT INK 3;AT(J,I);Z$:PRINT AT(J-1,I);"  "
 1010 NEXT J
 1020 B(F*10+L-1)=1
 1030 RETURN
 1040!
 1050!
 1060!         RECHTER CHIP RUTSCHT
 1070!
 1080!
 1090!
 1100 FOR I=34 TO 4*X+3 STEP-1
 1110 PRINT INK 5;AT(10,I);" ":PRINT INK 5;AT(10,35);""
 1120 GOSUB 2080
 1130 NEXT I:I=I+1
 1140 FOR L=1 TO 6
 1150 IF B(X*10+L)>0 THEN 1180
 1160 NEXT L
 1170 GOSUB 2080
 1180 FOR J=10 TO 11+L
 1190 PRINT INK 5;AT(J,I);"":PRINT INK 5;AT(J-1,I);"  "
 1200 NEXT J
 1210 B(X*10+L-1)=10
 1220 RETURN
 1230!
 1240!
 1250!          BERWERTUNG 
 1260!
 1270!
 1280 FOR K=1 TO 45
 1290 S=0
 1300 FOR J=1 TO 4
 1310 S=S+B(T(K,J))
 1320 P(K)=S
 1330 NEXT J
 1340 IF S=40 AND C=1 THEN 2040
 1350 IF S=40 THEN 1980
 1360 IF S=4 THEN 2010
 1370 NEXT K:RETURN
 1380!
 1390!
 1400!    DER COMPUTER RECHNET
 1410!
 1420!
 1430!
 1440 FOR K=1 TO 45
 1450 IF P(K)=30 THEN GOSUB 1630
 1460 IF P(K)=3 AND K>24 THEN 1510
 1470 IF P(K)=3 AND K<25 THEN 1550
 1480 NEXT K
 1490 GOTO 1760
 1500!
 1510 FOR J=1 TO 4
 1520 IF B(T(K,J))>0 THEN 1540
 1530 X=INT(T(K,J)/10):GOTO 650
 1540 NEXT J
 1550 FOR J=1 TO 4
 1560 IF B(T(K,J))>0 THEN 1620
 1570 IF T(K,J)-(INT(T(K,J)/10))*10=6 THEN X=INT(T(K,J)/10):GOTO 650
 1580!
 1590 IF B(T(K,J)+1)>0 THEN X=INT(T(K,J)/10):GOTO 650
 1600 Y=INT(T(K,J)/10)
 1610 GOTO 1480
 1620 NEXT J
 1630 FOR J=1 TO 4
 1640 IF B(T(K,J))>0 THEN 1740
 1650 IF K<25 THEN 1690
 1660 X=INT(T(K,J)/10):CLS
 1670 PRINT TAB(120)"HAHA, ICH GEWINNE MIT FACH";X;"!!!"
 1680 PRINT AT(8,0);" ":E=1:GOTO 580
 1690 IF T(K,J)-(INT(T(K,J)/10))*10=6 THEN X=INT(T(K,J)/10):CLS:GOTO 1670
 1700 IF B(T(K,J)+1)>0 THEN X=INT(T(K,J)/10):GOTO 1720
 1710 RETURN
 1720 IF B(X*10+1)>0 THEN RETURN ELSE CLS:GOTO 1670
 1730!
 1740 NEXT J
 1750 RETURN
 1760 FOR K=25 TO 45
 1770 IF P(K)<>20 THEN 1820
 1780 FOR J=1 TO 4
 1790 IF B(T(K,J))>0 THEN 1810
 1800 X=INT(T(K,J)/10):IF X=Y THEN 1810 ELSE 650
 1810 NEXT J
 1820 NEXT K
 1830 FOR K=1 TO 24
 1840 IF P(K)<>20 THEN 1960
 1850 FOR J=1 TO 4
 1860 IF B(T(K,J))>0 THEN 1950
 1870 IF T(K,J)-(INT(T(K,J)/10))*10=6 THEN X=INT(T(K,J)/10):GOTO 1890
 1880 GOTO 1900
 1890 IF X=Y THEN 1950 ELSE 650
 1900 IF B(T(K,J)+1)>0 THEN X=INT(T(K,J)/10):GOTO 1920
 1910 GOTO 1950
 1920 IF X=Y THEN 1950 ELSE 650
 1930!
 1940!
 1950 NEXT J
 1960 NEXT K
 1970 X=INT(RND(1)*7+1):IF X=Y THEN 1970 ELSE 650
 1980 CLS:PRINT N2$;" HAT GEWONNEN !!!!!"
 1990 PRINT:PRINT N$;" MUSS SICH BESSER KONZENTRIEREN !":PRINT AT(7,0);" " 
 2000 GOTO 2040
 2010 CLS:IF C=1 THEN 2060
 2020 PRINT N$;" HAT GEWONNEN !!!!!"
 2030 PRINT:PRINT N2$;" MUSS SICH BESSER KONZENTRIEREN !":PRINT AT(7,0);" "
 2040 PAUSE 60:WINDOW:CLS:END
 2050!
 2060 PRINT "GLUECKWUNSCH, DU HAST GEWONNEN !
 2070 PRINT AT(5,0);" ":GOTO 2040
 2080 FOR P=1 TO 10
 2090 NEXT P:RETURN