home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C64'er
/
C64'er.iso
/
87xx
/
8705.d64
/
bas-zellularauto
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
2KB
|
109 lines
1 REM **** ZELLULARAUTOMAT ****
2 REM * VON RUEDIGER LORENZ *
3 REM * MUFFETER WEG 41 *
4 REM **** 5100 AACHEN ****
6 TB=50292
7 POKE 53280,0:POKE 53281,0:POKE 646,1
8 DIM PK(40):DIMW(15,10)
10 PRINT"[147]"
15 INPUT"FARBEN 0,1,2 UND 3";FA(0),FA(1),FA(2),FA(3)
20 INPUT"ZUORDNUNG (NEU/ALT/RND)";A$
30 IF A$="N" THEN GOTO 100
40 IF A$="A" THEN GOTO 300
50 IF A$="R" THEN GOTO 500
60 GOTO 20
99 REM ***********
100 PRINT"SUMME => FARBE "
105 FOR S=0 TO 9
110 PRINT" ";S" => [145]" :INPUT"";F(S)
120 IF F(S)>3 THEN GOTO 110
130 POKETB+S,F(S):NEXT
150 GOSUB 1000 REM START
160 PRINT"ZURUECK ZUM MENUE (_)"
170 INPUTA$
180 IF A$<>"_" THEN GOTO 100
190 GOTO 10
299 REM ***********
300 RESTORE
310 FOR ZU=0 TO 15:PRINT"<";ZU">",
320 FOR I=0 TO 9
330 READ W(ZU,I)
340 PRINT W(ZU,I);
350 NEXT I
355 IF ZU/2<>INT(ZU/2) THEN PRINT
358 NEXT ZU
360 INPUT"NUMMER";NR
365 IF NR>15 THEN GOTO 360
370 FOR I=0 TO 9:POKE TB+I,W(NR,I):F(I)=W(NR,I):NEXT
380 GOSUB 1000 REM START
390 PRINT"ZURUECK ZUM MENUE (_)"
400 INPUTA$
410 IF A$<>"_" THEN GOTO 300
420 GOTO 10
499 REM ***********
500 PRINT"ZUORDNUNGSVORSCHRIFT WIRD DURCH RND-FKT ERZEUGT"
505 FOR I=0 TO 9:PRINTI;:NEXT:PRINT
510 FOR I=0 TO 9
520 F(I)=INT(4*RND(1))
530 POKE TB+I,F(I):PRINTF(I);
540 NEXT:PRINT
550 GOSUB 1000 REM START
560 PRINT"ZURUECK ZUM MENUE (_)"
570 INPUTA$
580 IF A$<>"_" THEN GOTO 500
590 GOTO 10
999 REM ***********
1000 SYS 49155
1005 INPUT"BITMUSTER (SELBST/RND)";BI$
1010 IF BI$="S" THEN GOSUB 3000:GOTO 1060
1030 INPUT"BREITE DES URSPRUNGSMUSTERS";BR
1040 IF BR>160 THEN GOTO 1030
1045 DL=(160-BR)/2
1050 FOR I=0+DL TO 160-DL:SYS 49161,I,0,INT(4*RND(1)):NEXT
1060 SYS 49152:SYS 49158,FA(0),FA(1),FA(2),FA(3)
1070 SYS 50176:WAIT 198,1
1080 GET A$
1082 IF A$=" " AND BI$="S" THEN SYS 49173:PRINT"[147]":GOTO 1010
1084 IF A$=" " THEN SYS 49155:GOTO 1050
1086 IF A$="^" THEN GOSUB 4000:GOTO 1070
1090 SYS 49173:PRINT"[147]":RETURN
2999 REM *********
3000 SYS 49155
3001 PRINT"[147] 40 PUNKTE BREITE EINGABEZEILE"
3002 PRINT" PUNKTRASTER MIT FUNKTIONSTASTEN"
3003 PRINT" F1=0,F3=1,F5=2,F7=3"
3004 PRINT""
3005 WAIT 198,1
3020 FOR Z=0 TO 39
3030 GET A$
3040 IF A$="[133]" THEN ZF=0:GOTO 3080
3050 IF A$="[134]" THEN ZF=1:GOTO 3080
3060 IF A$="[135]" THEN ZF=2:GOTO 3080
3070 IF A$="[136]" THEN ZF=3:GOTO 3080
3075 GOTO 3030
3080 POKE 1184+Z,102:POKE 55456+Z,FA(ZF)
3090 SYS 49161,60+Z,0,ZF:PRINTZ;:NEXT
3100 RETURN
3999 REM ********
4000 FOR W=0 TO 39
4010 PK(W)=PEEK(W*8+15879):NEXT
4020 SYS 49155
4030 FOR W=0 TO 39
4040 POKEW*8+8192,PK(W):NEXT:RETURN
10000 DATA 3,3,0,0,2,2,1,1,0,0
10001 DATA 0,2,3,0,0,1,1,1,3,3
10002 DATA 0,1,0,2,0,3,0,1,0,0
10003 DATA 0,1,0,2,0,3,0,1,3,3
10004 DATA 3,3,1,1,2,1,3,0,2,0
10005 DATA 0,0,1,1,2,2,3,0,1,0
10006 DATA 3,0,3,1,0,1,2,0,2,0
10007 DATA 1,2,0,0,3,2,1,2,0,1
10008 DATA 0,3,3,0,3,0,2,2,1,0
10009 DATA 0,0,0,0,0,0,0,0,0,0
10010 DATA 0,0,0,0,0,0,0,0,0,0
10011 DATA 0,0,0,0,0,0,0,0,0,0
10012 DATA 0,0,0,0,0,0,0,0,0,0
10013 DATA 0,0,0,0,0,0,0,0,0,0
10014 DATA 0,0,0,0,0,0,0,0,0,0
10015 DATA 0,0,0,0,0,0,0,0,0,0