home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er
/
64ER_CD.iso
/
sh3x
/
sh34c.d64
/
blattlaus
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
7KB
|
306 lines
100 d1 NEUBEGINN
110 PRINT"[147]":dg:CLR:dz:d 6,6
120 DIM FELD(36),X(36),Y(36),L(300),K(300),H(300),V(300)
130 PRINT"[147]":d 6,6:POKE 198,0
140 de 6,0,0,6:d3 TITEL
150 REM **** 500 ****
160 d3 PARAMETER
170 REM **** 8000 ****
180 d3 SONDERZEICHEN
190 REM **** 9000 ****
200 :
300 REM **** PROGRAMMBEGINN ****
305 :
310 d1 VORBEREITEN
315 PRINT"[147]":de 5,0,0,1
320 FL=0:B=-1:NF=0:FG=0:REM ** FLAGS ** *
325 REM FL:GIFT;B:BALKEN;NF:NEUANFANG
330 d3 do
335 REM **** 1000 ****
340 d3 SPIELFELD
345 REM **** 1500 ****
350 d3 BELEGEN
355 REM **** 2000 ****
360 d2 START
365 REM **** 2500 ****
370 :
400 d1 SPIELEN
410 d3 WUERFELN
415 REM **** 4000 ****
420 IF NF=1 THEN d2 VORBEREITEN
430 PRINTd(0,23)"[144] [G]RAFIK [T]ABELLEN [E]NDE [N]EU ";
440 d2 KOMMANDO
445 REM **** 3000 ****
450 :
490 END:REM **** PROGRAMM ENDE ****
495 :
500 d1 TITEL
505 d 6,6:PRINT"[154][147]"
510 PRINTd(0,5)" * DIETMAR LINHART * PH-GMUEND * 1988 * ":PRINT:PRINT
520 d#" DAS RAEUBER - BEUTE - SPIEL [146]":PRINT:PRINT:PRINT
530 d#"EIN POPULATIONSOEKOLOGISCHES":PRINT:PRINT
540 d#"WUERFELSPIEL":PRINT:PRINT:PRINT
550 d#"NACH EINER ANREGUNG AUS:"
560 PRINT:PRINT:PRINT
570 d#" UNTERRICHT BIOLOGIE 2/1986 [146]"
580 d4
590 :
1000 d1 do
1010 d 6,5:PRINT"[147][144]"
1020 PRINTd(1,2)" [152] OEKOSPIEL (UB 2/86)[146][144] ZAEHLER : "
1030 PRINTd(18,5)"START ......... [S]"
1040 PRINTd(18,7)"BALKENDIAGRAMM [B]"
1050 PRINTTAB(20)"EIN / AUS":PRINT
1060 PRINTTAB(18)"INSEKTIZID .... [I]"
1070 PRINTd(18,13)"NEUBEGINN ..... [N]"
1080 PRINTd(18,15)"ENDE [E] / HALT [H]"
1100 d4
1110 :
1500 d1 SPIELFELD
1510 d 4,3,13,13,160,0
1520 d 18,2,36,4,160,0
1530 PRINTd(3,4)RA$;
1540 FOR R=1TO2:PRINT R$(R);:NEXT
1550 FOR R=1TO5:PRINT R$(3);R$(2);:NEXT
1560 PRINT R$(4)
1590 d4
1595 :
1600 d1 RASTER
1605 RA$="[152]"
1610 ZS$="[157][157][157][157][157][157][157][157][157][157][157][157][157]"
1620 R$(1)=CHR$(161)+CHR$(189)
1630 FOR I=1 TO 5:R$(1)=R$(1)+CHR$(167)+CHR$(189):NEXT:R$(1)=R$(1)+CHR$(187)
1640 R$(1)=R$(1)+ZS$
1650 S$=CHR$(126)+CHR$(160):FOR I=1 TO 6:R$(2)=R$(2)+S$:NEXT
1660 R$(2)=R$(2)+CHR$(126)+ZS$
1670 R$(3)=CHR$(127)+CHR$(189):S$=CHR$(171)+CHR$(189)
1680 FOR I=1 TO 5:R$(3)=R$(3)+S$:NEXT:R$(3)=R$(3)+CHR$(163)+ZS$
1690 R$(4)=CHR$(124)+CHR$(189)
1695 S$=CHR$(164)+CHR$(189):FOR I=1 TO 5:R$(4)=R$(4)+S$:NEXT
1700 R$(4)=R$(4)+CHR$(96)
1900 d4
1910 :
2000 d1 BELEGEN
2005 K=0:L=0
2010 Z$(1)=K$:Z$(2)=L$:Z$(3)=X$
2020 FOR I=1 TO 36:Z=INT(6*RND(1))+1
2030 IF Z>2 THEN FELD(I)=3:Z=3
2040 IF Z=1 THEN FELD(I)=1:K=K+1
2050 IF Z=2 THEN FELD(I)=2:L=L+1
2060 PRINTd(X(I),Y(I))Z$(Z):NEXT I
2070 K(1)=K:L(1)=L:PRINTd(33,2)"[144]"1
2100 d4
2110 :
2500 d1 START
2510 GET A$
2520 IF A$="S" THEN d2 SPIELEN
2530 IF A$="N" THEN d2 VORBEREITEN
2540 IF A$="E" THEN d2 ENDE
2550 IF A$<>"B"THEN d2 START
2560 B=-B:d3 BALKEN
2570 d2 START
2600 :
3000 d1 INTERKOM
3010 P=PEEK(203)
3020 IFP=28THEN B=-B:d3 BALKEN
3030 d :d) PEEK(203)<>28
3040 IFP=33THEN d3 GIFT
3050 IFP=14THEN d2 ENDE
3060 IFP=39THEN NF=1
3070 IFP=29THENd :d)PEEK(203)=64
3080 POKE 198,0:d4
3090 :
3200 d1 KOMMANDO
3210 P=PEEK(203)
3220 IFP=26THEN d3 GRAFIK
3240 IFP=22THEN d3 TABELLEN
3250 IFP=14THEN d2 ENDE
3260 IFP=20ORP=29THEN d3 dw
3270 IFP=39THEN dg:d2 NEUBEGINN
3280 d2 KOMMANDO
3290 :
3500 d1 GIFT
3510 IF FL=0 THEN FL=1:MI=I
3520 PRINTd(35,10)"I[144][146]"
3530 FOR IN=1 TO 15
3540 Z=INT(36*RND(1))+1:X=X(Z):Y=Y(Z)
3550 IF FELD(Z)=1 THEN K=K-1:FELD(Z)=3:PRINTd(X,Y)X$
3560 IF FELD(Z)=2 THEN L=L-1:FELD(Z)=3:PRINTd(X,Y)X$
3570 NEXT IN
3580 PRINTd(35,10)"I"
3600 d4
3610 :
4000 d1 WUERFELN
4010 FOR I=2 TO 300:PRINTd(33,2)"[144]"I
4020 IFPEEK(203)<>64THEN d3 INTERKOM
4025 IF NF=1 THEN d4
4030 :
4100 REM **** KAEFERWURF ****
4110 Z=INT(36*RND(1))+1:X=X(Z):Y=Y(Z)
4120 IF FELD(Z)=2 THEN K=K+1:L=L-1:FELD(Z)=1:PRINTd(X,Y)K$:GOTO 4180
4130 IF K=0 THEN 4180
4140 IF FELD(Z)=1 THEN K=K-1:FELD(Z)=3:PRINTd(X,Y)X$:GOTO 4180
4150 FOR F=1 TO 36
4160 IF FELD(F)=1 THEN K=K-1:FELD(F)=3:PRINTd(X(F),Y(F))X$:GOTO 4180
4170 NEXT F
4180 IF K<0 THEN K=0
4190 K(I)=K
4200 :
4300 REM **** LAUSWURF ****
4310 Z=INT(36*RND(1))+1:X=X(Z):Y=Y(Z)
4320 IF FELD(Z)=1 THEN 4370
4330 IF FELD(Z)=3 THEN L=L+1:FELD(Z)=2:PRINTd(X,Y)L$:GOTO 4370
4340 FOR F=1 TO 36
4350 IF FELD(F)=3 THEN L=L+1:FELD(F)=2:PRINTd(X(F),Y(F))L$:GOTO 4370
4360 NEXT F
4370 IF L<0 THEN L=0
4380 L(I)=L
4390 :
4400 IF B=1 THEN d3 BALKEN
4410 NEXT I
4420 d4
4430 :
4990 :
5000 d1 BALKEN
5010 IF B=-1 THEN d 18,2,36,4,160,0:d4
5020 PRINTd(3,19)KF$+MID$(KB$,37-K,35)
5040 PRINTd(3,20)LF$+MID$(LB$,37-L,35)
5100 d4
5120 :
5500 d1 GRAFIK
5505 SG=16:SK=SG-1:T=SG+4:SW=3:FC=1
5510 d 6,6:PRINT"[147]"
5515 IF FG=1 THEN dp 2:d4
5520 d 3,6
5525 d3 KOORDINATEN
5530 H(1)=SG:V(1)=98-K(1)*4+1
5535 do T,6,"KAEFER",1,1,8
5540 FOR I=SW+1 TO 300 STEP SW
5550 H(I)=SG+I:V(I)=98-K(I)*4+1
5555 IF V(I)<0 THEN V(I)=0
5560 d H(I-SW),V(I-SW),H(I),V(I),1
5570 NEXT
5580 :
5590 dv 14,6,6
5600 H(1)=SG:V(1)=197-L(1)*4+1
5610 do T,185,"LAEUSE",1,1,8
5620 FOR I=SW+1 TO 300 STEP SW
5630 H(I)=SG+I:V(I)=197-L(I)*4+1
5640 d H(I-SW),V(I-SW),H(I),V(I),1
5650 NEXT
5660 FG=1:d4
5670 :
5680 d1 KOORDINATEN
5690 d SK,199,SK,0,1
5700 d 10,199,320,199,1
5710 d 9,99,320,99,1
5720 d3 BESCHRIFTUNG
5730 FOR X=SK TO 320 STEP 25
5740 d X,199,X,194,1:NEXT
5750 FOR Y=179 TO 0 STEP -20
5760 TX=SK+21:TY=Y-3
5770 do TX,TY,"++++++++++++",1,1,25
5780 d SK-4,Y,SK,Y,1:NEXT
5790 :
5820 IF MI=0 THEN d4
5830 I=MI+16:d I-2,199,I-2,10,1
5840 d I-5,0,9,1,1
5850 d4
5860 :
5870 d1 BESCHRIFTUNG
5880 do 0,176,"5",1,1,8
5890 do 0, 76,"5",1,1,8
5900 do 0,6,"N",1,1,8
5910 do 0,16,"C",1,1,8
5920 do 0,26,"E",1,1,8
5930 do 0,36,"T",1,1,8
5940 d4
5950 :
6000 d1 ENDE
6010 dg:PRINT"[147][159]":d 0,0:PRINTd(9,7)" ENDE DES PROGRAMMS [146]"
6080 df 1:d 14,6:PRINT"[154][147]":END
6090 GOTO 6050
6100 PRINT"[144]LOAD"CHR$(34)"OEKOLOGIE"CHR$(34)",8":PRINT"RUN"
6110 POKE 631,19:POKE 632,13:POKE 633,13:POKE 198,3:END
6120 PRINT"[144]RUN":POKE 631,19:POKE 632,13:POKE 198,2:END
6130 :
6500 d1 dw
6510 IF P=20 THEN dw
6520 IF P=29 THEN ds
6600 d4
6610 :
6700 d1 HARDdw
6710 PRINT"":OPEN 1,3:OPEN 3,4:BI$=""
6720 FOR Z=1 TO 25
6730 FOR S=1 TO 40
6740 GET#1,A$:BI$=BI$+A$:NEXT S
6750 PRINT#3,BI$:BI$="": NEXT Z
6760 PRINT#3:CLOSE3:CLOSE1
6770 d4
6780 :
7000 d1 TABELLEN
7010 dg:d 6,6:PRINT"[147][154]":FC=2
7020 PRINT" POPULATIONSTABELLE (10.ER-SCHRITTE) [146]"
7025 PRINT:PRINT" STARTPOPULATION :"L(1)"LAEUSE ;"K(1)"KAEFER"
7030 PRINT:PRINT" POPULATION DER LAEUSE : [146]"
7050 FOR I=10 TO 300 STEP 10
7060 U$="##":L$=STR$(L(I))
7070 d, " "+U$,L$:PRINT" ";:NEXT I
7080 PRINT:PRINT
7090 PRINT" POPULATION DER KAEFER : [146]"
7100 FOR I=10 TO 300 STEP 10
7110 U$="##":K$=STR$(K(I))
7120 d, " "+U$,K$:PRINT" ";:NEXT I
7130 PRINT
7140 KI$=" KEIN INSEKTIZIDEINSATZ [146]"
7150 IF MI=0 THEN PRINT KI$:GOTO 7170
7160 PRINT" INSEKTIZIDEINSATZ BEI [146] :"MI
7170 PRINTd(0,23)" [G]RAFIK [H]ARDCOPY [E]NDE [N]EU ";
7200 d4
7210 :
8000 d1 PARAMETER
8010 d3 RASTER
8015 REM **** 1600 ****
8020 :
8025 REM **** FELDKOORDINATEN ****
8030 Z=0:XX=4:YY=5
8040 FOR Y=YY TO YY+10 STEP 2
8050 FOR X=XX TO XX+10 STEP 2:Z=Z+1
8060 X(Z)=X:Y(Z)=Y:NEXT X:NEXT Y
8070 :
8075 REM **** FARBDEFINITIONEN ****
8080 KF$="[150]":LF$="" : X$=CHR$(160)
8085 K$=KF$+CHR$(166):L$=LF$+CHR$(165)
8090 :
8095 REM **** BALKENVORGABEN ****
8100 LE$=dU(CHR$(160),35)
8110 KB$=dU(CHR$(166),36)+LE$
8120 LB$=dU(CHR$(165),36)+LE$
8130 ZL$=dU(CHR$(160),10)
8140 :
8150 d4
8160 :
9000 d1 SONDERZEICHEN
9010 d0 9110
9020 BA=57344
9030 FOR Z=0 TO 12:READ C:AD=BA+8*C
9040 FOR BM=0 TO 7:READ D:POKE AD+BM,D
9050 NEXT BM:NEXT Z
9060 d4
9070 :
9100 REM ZEICHENDATEN
9110 DATA 43,24,24,24,255,255,24,24,24
9120 DATA 61,0,0,0,255,255,0,0,0
9130 DATA 30,24,24,24,24,24,24,24,24
9140 DATA 31,24,24,24,31,31,24,24,24
9150 DATA 35,24,24,24,248,248,24,24,24
9160 DATA 36,24,24,24,255,255,0,0,0
9170 DATA 39,0,0,0,255,255,24,24,24
9180 DATA 28,24,24,24,31,31,0,0,0
9190 DATA 59,0,0,0,248,248,24,24,24
9200 DATA 33,0,0,0,31,31,24,24,24
9210 DATA 0,24,24,24,248,248,0,0,0
9220 DATA 37,130,68,40,16,84,40,40,84
9230 DATA 38,186,68,0,238,170,170,108,40
9500 END