0 POKE26,1 1 REM...CONDUITE D'UNE CENTRALE NUCLEAIRE 2 REM 3 REM...MICHEL PIPON.....NOV.83 4 REM 5 REM.....................PRESENTATION 8 REM MODIFS ATMBAD SUBSCRIPT ` M.DESANGLES 9 IFPEEK(#D000)=166THENAA=0ELSEAA=1 10 TEXT:CLS 20 PAPER0:INK2:POKE618,10:GOSUB10700 25 PLOT30+AA,6,16:PLOT30+AA,13,16 30 FORI=7TO12:PLOT8+AA,I,10:PLOT7+AA,I,17:PLOT30+AA,I,16:NEXT 35 PLOT7+AA,6,17:PLOT7+AA,13,17 40 C=3:X=12:Y=7:A$="CONDUITE D'UNE":GOSUB10200 45 Y=8:GOSUB10200 50 X=10:Y=11:A$="CENTRALE NUCLEAIRE":GOSUB10200 55 Y=12:GOSUB10200 57 FORI=1TO30:READA:NEXT 60 T=7:N=21:GOSUB30000 70 GOSUB 12000 80 GOSUB10305 90 REM.......................MENU 100 CLS 110 TEXT 120 PRINT:PRINT:PRINT"On se propose de simuler le fonction- nement d'une centra le "; 125 PRINT"nucleaire" 130 PRINT:PRINT"Vous pouvez choisir une des options suivantes:" 140 X=5:Y=16:C=5:A$="3-Commencement du jeu":GOSUB10200 145 X=5:Y=18:C=1:A$="4-Fin du jeu":GOSUB 10200 150 Y=10:C=4:A$="1-Principe de fonctionnement":GOSUB10200 155 Y=12:A$=" d'une centrale":GOSUB10200 160 Y=14:C=6:A$="2-Explications des commandes":GOSUB10200 170 X=5:Y=23:C=3:A$="Donnez le numero correspondant":GOSUB10200 180 Y=24:X=10:A$="a l'option choisie":GOSUB10200 190 PING 195 GETR$ 200 IF R$<>"1" AND R$<>"2" AND R$<>"3" AND R$<>"4" THEN 195 210 ON VAL(R$) GOSUB 9000,8000,500,400 220 TEXT:POKE618,10 230 GOSUB10700:CLS 250 GOTO 130 400 CLS:POKE618,3:IFAA=0THENCALL#F89BELSECALL63694 410 END 500 REM....................DEBUT JEU 505 TEXT:CLS 507 PRINT:PRINT:PRINT 510 PRINTSPC(2)"Jour";SPC(2)"T.Re";SPC(2)"T.Ec";SPC(2)"T.To";SPC(2)"E.jo"; 520 PRINTSPC(2)"E.mo" 1000 N=7:C=16:GOSUB 15000 1010 C=20:N=3:GOSUB 15000 1020 N=6:GOSUB 15000 1030 N=7:C=16:GOSUB 15000 1050 FOR I=4 TO 24 STEP 6 1060 FOR J=1 TO 9 1070 PLOT I+AA,18-J,STR$(J) 1080 NEXTJ 1090 NEXTI 1100 C=20:N=4:GOSUB 15000 1110 FOR I=4 TO 24 STEP 6 1120 PLOTI+AA,18,18 1130 NEXT I 1135 FOR A=1TO4:Y(A)=17:NEXTA 1140 PLOT4+AA,20,"RE":PLOT10+AA,20,"CP" 1150 PLOT16+AA,20,"CS":PLOT22+AA,20,"CU" 1230 POKE48000,67:POKE48001,85 2000 FORJ=8TO14 2010 PLOT31+AA,J,22 2015 PLOT38+AA,J,22 2020 NEXTJ 2030 PLOT32+AA,7,"FUITES" 2040 PLOT28+AA,9,"CP":PLOT32+AA,9,16 2050 PLOT28+AA,11,"CS":PLOT32+AA,11,16 2060 PLOT28+AA,13,"CU":PLOT32+AA,13,16 2070 FORJ=16TO19 2080 PLOT31+AA,J,21 2085 PLOT38+AA,J,21 2090 NEXTJ 2095 PLOT30+AA,17,10:PLOT30+AA,18,10 2100 PLOT32+AA,17,16:PLOT32+AA,18,16 2105 FORI=9TO13STEP2 2110 PLOT35+AA,I,"l/j" 2120 NEXTI 2130 PLOT29+AA,17,1:PLOT29+AA,18,1 2140 PLOT31+AA,20,"PRODUCT." 3900 GOSUB22000 3990 C=17:GOSUB7100 4000 JOUR=0:RH=0:RL=0:TT=0:EM=0:CO=0 4005 DMGE=0:A0=0:A1=0:A2=0:D4=0 4010 S=0:RE=0:CP=0:CU=0:CS=0 4020 GOSUB18000:IFRT=25ANDXT=25ANDCT=25THEN5000 4030 IFRD>5THEN23000 4050 IF(100-RL)<5THENGOSUB10800:GOTO5450 4060 IFTT=99999THEN5410 4070 IFHA>.965ORHB>9THENGOSUB14000 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>test incident 4080 IFNH=1THENGOSUB14100:GOTO5000 4090 GOSUB16000 5000 X=3:Y=5:C=4:A$="VOUS POUVEZ EFFECTUER VOS REGLAGES":GOSUB 10200 5010 PLOT 1,5,12 5020 HA=RND(1) 5140 GETA$ 5150 IFASC(A$)=8THENA=A-1 5155 IFASC(A$)=9THENA=A+1 5160 IFA<1THENA=4 5165 IFA>4THENA=1 5170 IFNC=1ANDA=4THEN5140 5180 ONAGOSUB7100,7200,7300,7400 5190 IF ASC(A$)<>11 THEN5200 5191 C=17:PLOTZ+AA,Y(A),C:Y(A)=Y(A)-1:IF Y(A)<9 THEN Y(A)=8 5192 IFPEEK(#208)=#9CTHEN5191 5200 IF ASC(A$)<>10 THEN5210 5201 C=20:PLOTZ+AA,Y(A),C:Y(A)=Y(A)+1:IF Y(A)>16 THEN Y(A)=17 5202 IFPEEK(#208)=#B4THEN5201 5210 IF A$="F" THEN PLOT2+AA,5,0:GOTO5500 5240 IFA$="R"THENPLOT2+AA,5,0:GOSUB16000 5290 IF ASC(A$)=13 THEN ZAP: PLOT2+AA,5,0:GOSUB17000:HB=HB+1:GOTO4020 5400 GOTO5000 5410 GOSUB10800 5420 PRINT:PRINT:PRINTSPC(5)CHR$(27)"DPRODUCTION ATTEINTE" 5430 GOTO5470 5450 GOSUB10800 5460 PRINT:PRINT:PRINTSPC(5)CHR$(27)"DCOMBUSTIBLE EPUISE"; 5470 WAIT500 5500 GOSUB10700:CLS:CO=1 5600 PRINT"Sur une periode de ";JOUR;" jours,vous avez produit une moyenne de " ; 5610 PRINTINT(EM);" kWh" 5620 AK=1-(EM>799)-(EM>899)-(EM>999)-(EM>1099)-(EM>1199)-(EM>1299)-(EM>1399) 5630 AK=AK-(EM>1499) 5640 PRINT:PRINT:PRINT"Votre taux de production est "; 5650 ONAKGOTO5655,5660,5670,5680,5690,5700,5710,5720,5730 5655 PRINT"tres mauvais.Cherchez un autre travail.":GOTO5740 5660 PRINT"mauvais.Votre zone a connu de frequents blackouts.":GOTO5740 5670 PRINT"assez mauvais.Votre zone a connu des blackouts occasionnels.":GOTO57 40 5680 PRINT"loin en dessous des minima.":GOTO5740 5690 PRINT"faible.Votre zone a connu quelques jours difficiles.":GOTO5740 5700 PRINT"moyen.Les besoins en electricite ont ete tout juste combles.":GOTO57 40 5710 PRINT"encourageant.Peut mieux faire.":GOTO5740 5720 PRINTexcellent.":GOTO5740 5730 PRINT"proche du maxima.Tres bien.":GOTO5740 5740 GOSUB22000 5750 D=1-(DM>10)-(DM>20)-(DM>30) 5760 PRINT:PRINT:PRINT"Les degats furent "; 5770 ONDGOTO5780,5790,5800,5810 5780 PRINT"tres legers.":GOTO5900 5790 PRINT"moderes.":GOTO5900 5800 PRINT"serieux.":GOTO5900 5810 PRINT"severes.":GOTO5900 5900 GOSUB29000:GOSUB10300 6000 QW=0:RETURN 7100 REM 7110 Z=4:A=1 7120 PLOT2+AA,20,12 7130 PLOT8+AA,20,8 7140 PLOT14+AA,20,8 7150 PLOT20+AA,20,8 7170 RETURN 7200 REM 7210 Z=10 7220 PLOT2+AA,20,8 7230 PLOT8+AA,20,12 7240 PLOT14+AA,20,8 7250 PLOT20+AA,20,8 7270 RETURN 7300 REM 7310 Z=16 7320 PLOT2+AA,20,8 7330 PLOT8+AA,20,8 7340 PLOT14+AA,20,12 7350 PLOT20+AA,20,8 7370 RETURN 7400 REM 7410 Z=22 7420 PLOT2+AA,20,8 7430 PLOT8+AA,20,8 7440 PLOT14+AA,20,8 7450 PLOT20+AA,20,12:PLOT26+AA,20,8 7470 RETURN 8000 REM....................EXPLICATIONS 8005 TEXT:CLS 8010 PRINT"Vous avez 4 reglages :" 8020 PRINT:PRINT" ";CHR$(27)"F1-Controle du reacteur";CHR$(27)"DRE" 8030 PRINT:PRINT" ";CHR$(27)"F2-Debit circuit primaire";CHR$(27)"DCP" 8040 PRINT:PRINT" ";CHR$(27)"F3-Debit circuit secondaire";CHR$(27)"DCS" 8050 PRINT:PRINT" ";CHR$(27)"F4-Debit circuit d'urgence";CHR$(27)"DCU" 8052 PRINT:PRINT"Les reglages sont effectues avec les 4 touches flechees." 8053 PRINT:PRINT"Vous disposez aussi des touches:" 8054 PRINT" "CHR$(27)"FRETURN";CHR$(27)"BPrend en compte les reglages."; 8056 PRINT" "CHR$(27)"FF";SPC(5)CHR$(27)"BFin." 8058 PRINT" "CHR$(27)"FR";SPC(5)CHR$(27)"BRevoir le rapport." 8060 PRINT:PRINT"Le combustible est suffisant pour une duree de 100 a 150 jours ." 8070 PRINT:PRINT"Il faut arriver a produire 100000 kWh.Vous aurez alors gagne." 8080 GOSUB10300 8090 CLS:PRINT" ";CHR$(27)"AREGLAGES BARRES DE CONTROLE":PRINT 8100 PRINT"Pour regler la reaction en chaine on utilise des barres de controle ." 8105 PRINT 8110 PRINT"Suivant qu'elles sont introduites plusou moins profondement dans"; 8120 PRINT" le reacteur,la reactivite decroit ou croit" 8130 PRINT:PRINT"Plus les barres sont sorties plus la temperature augmente" 8150 PRINT:PRINT"Pour regler les barres il faut donner un nombre entre 0 et 10" 8160 PRINT 8170 PRINT" "CHR$(27)"F 0 :barres entrees" 8180 PRINT" "CHR$(27)"F10 :barres sorties" 8185 GOSUB10300:CLS 8190 PRINT:PRINT" ";CHR$(27)"ADEBITS CIRCUITS" 8200 PRINT:PRINT"Pour indiquer le debit du circuit on donne un nombre entre"; 8210 PRINT" 0 et 10" 8215 PRINT 8220 PRINT" "CHR$(27)"F 0 :debit nul" 8230 PRINT" "CHR$(27)"F10 :debit maxi" 8235 PRINT:PRINT" "CHR$(27)"AATTENTION:";CHR$(27)"B"; 8240 PRINT"La quantite d'eau dispo-nible dans le circuit d'urgence est limitee" 8245 PRINT 8250 PRINT"Un accroissement du debit du circuit primaire abaisse la temperatur e "; 8260 PRINT"du coeur et augmente celle de l'echangeur" 8265 PRINT 8270 PRINT"Un accroissement du debit du circuit secondaire abaisse "; 8275 PRINT"la temperature de l'echangeur "; 8280 PRINT"mais augmente la temperature de la tour de refroidissement." 8290 GOSUB10300 8300 CLS 8600 PRINT" "CHR$(27)"AARRET DE LA CENTRALE" 8620 PRINT:PRINT:PRINT"En cas d'incident ou de deterioration on peut arreter la centrale." 8630 PRINT"Pour cela il faut amener la temperatu-re du reacteur en dessous de 1 50"; 8640 PRINTSPC(6)"degres et mettre tous les reglages a 0" 8650 IFPEEK(#D000)=166THENPOKE616,14:PRINT:GOTO8660 8655 PRINT@2,14;"":PRINT 8660 PRINT" "CHR$(27)"AFUITES" 8670 PRINT:PRINT"En cas de fuites trop importantes la production chute." 8680 PRINT"Il faut alors reparer." 8820 GOSUB10300:CLS 8890 QW=0 8900 RETURN 9000 REM....................SCHEMA CENTRALE 9001 HIRES :PRINTCHR$(17) 9002 X=4:Y=10:C1=3:C2=3:R=46:A=85:GOSUB10100 9004 X=4:Y=55:C1=3:C2=6:R=100:A=142:GOSUB10100 9005 X=12:Y=182:C=4:A$="PRINCIPE DE BASE D'UNE CENTRALE PWR":GOSUB10000 9010 CURSET 23,40,0:DRAW0,86,1:DRAW50,0,1:DRAW0,-86,1 9020 CURSET 48,40,0:CIRCLE25,1 9030 X=24:Y=40:C1=0:C2=3:R=25:A=42:GOSUB10100 9040 X=30:Y=75:C1=17:C2=16:R=40:A=39:GOSUB 10100 9045 X=37:Y=105:C=0:A$="RE":GOSUB10000 9047 X=56:Y=105:C1=3:C2=3:A=6:R=8:GOSUB10100 9050 X=20:Y=130:C=1 :A$="Coeur du ":GOSUB 10000 9055 Y=142:A$="reacteur":GOSUB 10000 9060 PRINT"Le coeur du reacteur est compose du combustible (uranium),du "; 9065 PRINT"moderateur et du fluide caloporteur (eau)"; 9070 WAIT600:CLS 9072 CURSET40,60,1:FILL40,5,120 9074 PRINT"La reaction est controlee grace a des barres de controle." 9076 WAIT600:CLS 9078 X=66:Y=62:C1=4:C2=6:A=82:R=5:GOSUB10100:X=66:Y=117:GOSUB10100 9079 X=80:Y=122:A=62:R=50:GOSUB10100 9080 CURSET72,62,0:DRAW70,0,1:DRAW0,58,1: DRAW-55,0,1:DRAW0,40,1:DRAW30,0,1 9082 DRAW0,-17,1:DRAW15,0,1:DRAW0,20,1:DRAW-48,0,1:DRAW0,-43,1:DRAW-10,0,1 9086 CURSET72,65,0:DRAW67,0,1 9088 CURSET72,65,0:DRAW67,0,1:DRAW0,52,1:DRAW-66,0,1 9090 X=80:Y=67:C1=4:C2=4:A=1:R=50:GOSUB10100 9100 CURSET 112,162,0:DRAW19,0,1:DRAW0,-9,1:DRAW-13,0,1:DRAW0,9,1:DRAW-6,0,1 9102 CURSET112,161,1:DRAW19,0,1 9105 CURSET 125,145,0:CHAR 80,0,1 9110 CURSET 119,145,0:CHAR67,0,1 9115 CURSET100,158,0:CHAR124,0,1 9116 CURSET 125,153,0:CHAR 64,0,1 9117 CURSET106,158,0:CHAR125,0,1 9118 CURSET 119,153,0:CHAR 64,0,1 9120 PRINT"Le fluide caloporteur (eau sous pres- sion) evacue hors du reacteur" ; 9125 PRINT"...":WAIT400 9130 PRINT"...la chaleur liberee par la fission nucleaire."; 9132 PRINT"C'est le circuit primaire." 9135 WAIT600:CLS 9140 PRINT"L'eau du circuit primaire transmet la chaleur"; 9150 X=132:Y=68:C1=21:C2=16:A=32:R=47:GOSUB10100 9160 X=110:Y=45:C=5 :A$="Echangeur":GOSUB 10000 9170 PRINT" au circuit secondaire dans un echangeur de chaleur"; 9175 WAIT600:CLS 9180 CURSET191,116,1:DRAW0,-54,1:DRAW-40,0,1 :DRAW0,58,1:DRAW37,0,1 9182 DRAW0,40,1:DRAW-17,0,1:DRAW0,-17,1:DRAW-15,0,1:DRAW0,20,1:DRAW35,0,1 9183 DRAW0,-46,1 9185 CURSET188,116,1:DRAW0,-51,1:DRAW-34,0,1:DRAW0,52,1:DRAW34,0,1 9187 CURSET175,161,1:DRAW-18,0,1:DRAW0,-8,1:DRAW13,0,1:DRAW0,9,1:DRAW4,0,1 9188 DRAW-17,0,1 9190 CURSET175,158,0:CHAR124,0,1 9192 CURSET181,158,0:CHAR125,0,1 9194 CURSET 159,145,0:CHAR67,0,1 9196 CURSET 165,145,0:CHAR83,0,1 9200 CURSET158,153,0:CHAR64,0,1 9205 CURSET164,153,0:CHAR64,0,1 9210 PRINT"Dans le circuit secondaire circule de la vapeur "; 9220 X=175:Y=72:C=2:A$="%&@":GOSUB10000 9225 Y=78:A$="@@@_":GOSUB10000 9227 Y=84:A$="!#@":GOSUB 10000 9230 PRINT"jusqu'a la turbine, qui est alors entrainee"; 9235 X=175:Y=45:C=2:A$="Turbine":GOSUB10000 9240 WAIT600:CLS 9260 PRINT"La turbine entraine l'alternateur qui produit l'electricite" 9270 X=205:Y=70:C1=23:C2=16:A=28:R=22:GOSUB10100 9280 X=193:Y=100:C=7:A$="Alter.":GOSUB10000 9290 WAIT600:CLS 9680 PRINTCHR$(27);"L } CIRCUIT PRIMAIRE |" 9700 X1=94:X2=78:ST=-6:Y=158:GOSUB13000 9710 Y1=152:Y2=118:X=83:ST=-8:GOSUB13100 9720 X1=81:X2=75:Y=115:ST=-6:GOSUB13000 9730 X1=75:X2=140:Y=60:ST=6:GOSUB 13000 9740 Y1=66:Y2=113:X=138:ST=8:GOSUB13100 9750 X1=136:X2=83:ST=-6:Y=115:GOSUB 13000 9760 CLS 9770 PRINTCHR$(27);"L } CIRCUIT SECONDAIRE |" 9780 X1=185:X2=185:ST=6:Y=158:GOSUB13000 9790 Y1=152:Y2=118:X=187:ST=-8:GOSUB13100 9800 X1=182:X2=150:ST=-6:Y=115:GOSUB13000 9810 Y1=113:Y2=63:X=150:ST=-8:GOSUB13100 9820 X1=153:X2=187:Y=60:ST=6:GOSUB13000 9830 Y1=66:Y2=113:X=187:ST=8:GOSUB13100 9900 PLAY0,0,0,0 9940 CLS 9950 GOSUB10320 9990 RETURN 10000 REM......................AFFICHAGE HIRES 10010 CURSETX,Y,0 10020 FILL8,1,C 10025 IFAA=1THENCURMOV0,-8,0 10030 FOR A=1 TO LEN(A$) 10040 CURMOV6,0,0 10050 CHAR ASC(MID$(A$,A,1)),0,1 10060 NEXT A 10070 RETURN 10100 REM....................BLOCS COULEURS HIRES 10110 CURSETX,Y,0 10120 FILLR,1,C1:REM R=hauteur du bloc 10130 CURSETX+A,Y,0:REMA=largeur du bloc 10140 FILLR,1,C2 10150 RETURN 10200 REM....................AFFICHAGE TEXT 10210 PLOT X-1+AA,Y,C 10220 PLOT X+AA,Y,A$ 10230 RETURN 10300 REM....................CONTINUER 10302 WAIT1000 10305 PLOT1+AA,24,12:PLOT0+AA,24,17 10310 C=3:X=3:Y=24:A$="appuyer sur la barre d'espacement":GOSUB10200 10320 GETS$ 10326 IF ASC(S$)=32 THEN 10340 ELSE10320 10340 RETURN 10350 REM....................NIV.CU 10500 S=S+CU 10510 IF S=0 THEN RETURN 10520 IF S>38 THEN S=38 10530 FOR I=0 TO S-1 10540 POKE 48039-I,16 10550 NEXT I 10560 IFS<38 THEN RETURN 10600 NC=1:Y(4)=17 10610 FORI=1TO11 10620 PLOT22+AA,I+6,20 10640 NEXTI 10650 FORI=1TO6 10660 I$=MID$("EPUISE",I,1) 10670 PLOT22+AA,I+9,I$ 10680 NEXTI 10690 RETURN 10700 REM....................EFFt CU 10710 FORI=0TO39:POKE48000+I,32:NEXT 10720 RETURN 10800 REM.....................AFFIC.RAPP. 10810 IFPEEK(#D000)=166THENPOKE616,22:PRINT:GOTO10830 10820 PRINT@2,20;"":PRINT 10830 FORI=1TO4:PRINTCHR$(14):NEXTI 10835 PRINTCHR$(14);CHR$(11) 10850 IFPEEK(#D000)=166THENPOKE616,22:PRINT:GOTO10860 10855 PRINT@2,20;"":PRINT 10860 PRINT" ";CHR$(27)"ERapport jour:";CHR$(27)"B"; 10900 RETURN 11000 REM......................PROTEC.AFF.RAPP. 11010 IFPEEK(616)<26THENRETURN 11020 PRINT".....";:WAIT500 11030 GOSUB10800 11040 RETURN 12000 REM....................DEF CARACT 12010 FORI=1TO10 12020 READMM(I) 12030 NEXTI 12040 FORI=1TO10 12050 FORJ=1TO8 12060 READA:POKEMM(I)+J,A 12070 NEXTJ 12080 NEXTI 12100 RETURN 13000 REM....................DEPLACT EAU 13005 FOR I=X1 TO X2 STEP ST 13010 CURSET I,Y,0 13015 MUSIC1,2,2,9:PLAY1,2,10,50:WAIT10 13020 CHAR95,0,1 13025 PLAY0,0,0,0:WAIT10 13030 NEXT I 13050 RETURN 13100 FOR I=Y1 TO Y2 STEP ST 13110 CURSET X,I,0 13115 MUSIC1,2,2,9:PLAY1,2,10,50:WAIT10 13120 CHAR92,0,1 13125 PLAY0,0,0,0:WAIT10 13130 NEXT I 13140 RETURN 14000 REM..................INCIDENT 14010 IFNH=1THENRETURN 14020 GOSUB10800 14030 PRINT"Un incident vient de survenir dans le reacteur." 14040 PRINT"Vous devez arreter la centrale dans les 3 jours pour reparation." ; 14050 NH=1:HB=0 14060 WAIT500:RETURN 14100 REM.......... 14105 GOSUB10800 14110 NJ=NJ+1 :IFNJ=1THENRETURN 14120 IFNJ=2THENPRINT"Il vous reste 2 jours":RETURN 14130 IFNJ=3THENPRINT"Il vous reste 1 jour":RETURN 14140 PRINT"Vous n'avez pu reus- sir a arreter la centrale a temps."; 14150 PRINT"Des vapeurs radioactives s'echappent de la centrale." 14160 PRINT" ";CHR$(27)"A"SPC(5)"REGION A EVACUER"; 14170 WAIT500:GOSUB21000 14180 GOSUB10700:CLS 14190 POP:RETURN 15000 REM......................blocs cmmandes 15010 FOR I=N TO N+18 STEP 6 15020 FOR J=7 TO 20 15030 PLOT I+AA,J,C 15040 NEXT J 15050 NEXT I 15070 RETURN 16000 REM....................COMMENT. 16100 GOSUB10800 16400 REM........... 16410 IFGZ<100THEN16480 16460 IFRT>800ORXT>500ORCT>300ORGZ>2000THEN16480 16464 IFGZ<1000AND(JOUR-D4>8)THEN16480 16466 IFEV<200ORPV<100ORSV<100THEN16480 16468 IFRD>3ORPD>4ORSD>4ORED>2THEN16480 16470 IFPB>0ORSB>0ORXB>0ORGB>0THEN16480 16471 IFJOUR=0THEN16475 16472 PRINT:IF JOUR<4THENPRINT"Demarrage normal -"; 16474 PRINT" Rien a signaler " 16475 RETURN 16480 REM............ 16500 PRINTCHR$(27)"CATTENTION :";CHR$(27)"B"; 16510 IFRT<800THEN16520 16512 PRINT" Reacteur surchauffe -";:IFA$="R"THEN16520 16513 RD=RD+1-(RT>850)-(RT>900)-2*(RT>950) 16514 PD=PD+1:ED=ED+1-(RD>850) 16520 IFXT<500THEN16530 16522 PRINT" Echangeur de chaleur surchauffe -";:IFA$="R"THEN16530 16524 XD=XD+1-(XT>600):PD=PD+1:SD=SD+1 16530 IFGZ<2000THEN16540 16532 PRINT" Turbine surchargee -";:IFA$="R"THEN16540 16534 TD=TD+1-(GZ>2500):SD=SD+1 16540 IFCT<300THEN16545 16542 PRINT" Tour de refroidissement surchauffee -";:IFA$<>"R"THENSD=SD+1 16545 GOSUB11000 16550 IFGZ<1000THENPRINT" Production basse -"; 16555 IFS=38THENPRINT" Circuit d'urgence epuise -";:GOTO16565 16560 IFEV<200THENPRINT" Circuit d'urgence bas -"; 16565 GOSUB11000 16570 IFPV<100THENPRINT" Circuit primaire bas -"; 16575 GOSUB11000 16580 IFSV<100THENPRINT" Circuit secondaire bas -"; 16590 GOSUB11020 16610 PRINTCHR$(27)"ADegats :";CHR$(27)"B";:SW=1 16620 IFRD>3THENPRINT" Coeur du reacteur endommage -";:SW=2 16630 IFPD<5ORA$="R"THEN16640 16634 PV=(PV-PD)*(-(PV-PD)>0) 16640 IFSD<5ORA$="R"THEN16650 16644 SV=(SV-SD)*(-((SV-SD)>0)) 16650 IFED<3ORA$="R"THEN16660 16654 EV=(EV-ED*2)*(-((EV-ED*2)>0)) 16660 IFPB=0THEN16670 16662 PRINT" Faiblesse pompe circuit primaire -";:SW=2 16670 IFSB=0THEN16680 16672 PRINT" Faiblesse pompe circuit secondaire -";:SW=2 16676 GOSUB11000 16680 IFXB>0THENPRINT" Faiblesse echangeur de chaleur -";:SW=2 16685 GOSUB11000 16690 IFGB>0THENPRINT" Faiblesse de la turbine-";:SW=2 16700 IF SW=1THEN PRINT " Aucuns" 16950 RETURN 17000 REM....................CALCULS 17005 GOSUB10800 17010 JOUR=JOUR +1 17015 J=0:FOR I=4 TO 24 STEP 6 17020 B=18:J=J+1 17025 REPEAT 17030 B=B-1 17035 UNTIL SCRN(I+AA,B)=20 17040 Z(J)=B+1 17045 NEXT I 17050 RE=18-Z(1):A0=10*RE 17060 CP=18-Z(2):PF=10*CP 17070 CS=18-Z(3):SF=10*CS 17080 CU=18-Z(4):EF=10*CU 17100 IFPF=0ANDSF=0ANDEF=0ANDRT<150ANDA0=0THENGOSUB22000ELSE17140 17110 GOSUB10800 17120 PRINT" Arret maintenance:";MD+1;"jours -"; 17130 FORI=1TOMD:WAIT50:ZAP:NEXTI:WAIT300 17140 IFEF>EVTHENEF=EV 17200 EV=EV-EF+2*ED*(ED>3) 17230 PB=-(PD>5) 17240 SB=-(SD>5) 17250 IFPF>(100-PD*10)ANDPB>0THENPF=(100-PD*10)*(-(100-PD*10>0)) 17260 IFSF>(100-SD*10)ANDSB>0THENSF=(10-SD*10)*(-(100-SD*10>0)) 17270 RL=RL+RH/50 17280 RH=(A0*30+A1*60+A2*10)/2500*(100-RL) 17300 PH=PF*(100*(-(PV>100))+PV*(-(PV<=100)))/350 17310 EH=EF/200*(RT-25) 17320 RT=RT+RH-EH-PH-5*(-(RT>25)) 17325 RT=25+(RT-25)*(-(RT>25)) 17330 XT=((RT-25)*PF+(CT-25)*SF)/(PF+SF+1)+25 17340 IFXB>0THENXT=RT*.8+5 17350 SH=SF*(100*(-(PV>100))+PV*(-(PV<=100)))/350*(XT-CT) 17360 IFXB>0THENSH=SH*.2 17370 GZ=SH/XT*(XT-CT)*2/3 17375 IFGZ>2600THENGZ=2600 17380 GZ=GZ*(-(GZ>0))*(-(GB=0)) 17390 CT=25+((XT-25)*(SH-GZ)/(SH+1)*.75) 17395 CT=25*(-(CT<=25))+CT*(-(CT>25)) 17400 IFXB<1THENXB=(-(XD>2))*(-(4*RND(0)>.9)) 17410 IFGB<1THENGB=(-(GD>2))*(-(4*RND(0)>.9)) 17420 TT=TT+GZ:EM=TT/JOUR 17430 IFTT>99999THENTT=99999 17500 RETURN 18000 REM....................AFFICHAGES CALCULS 18005 B$(0)=STR$(INT(TT)) 18010 B$(1)=STR$(JOUR) 18020 B$(2)=STR$(INT(RT)) 18030 B$(3)=STR$(INT(XT)) 18040 B$(4)=STR$(INT(CT)) 18043 B$(5)=STR$(INT(GZ)) 18046 B$(6)=STR$(INT(EM)) 18050 B$(7)=STR$(INT(PD)) 18055 B$(8)=STR$(INT(SD)) 18060 B$(9)=STR$(INT(ED)) 18065 C$="000" 18070 FORI=0TO9 18075 B$(I)=RIGHT$(B$(I),LEN(B$(I))-1) 18080 B$(I)=C$+B$(I) 18090 NEXTI 18100 FORI=1TO6 18105 B$(I)=RIGHT$(B$(I),4) 18110 NEXTI 18115 FORI=7TO9 18120 B$(I)=RIGHT$(B$(I),2) 18125 NEXTI 18130 B$(0)=RIGHT$(B$(0),5) 18140 PLOT33+AA,9,B$(7) 18150 PLOT33+AA,11,B$(8) 18160 PLOT33+AA,13,B$(9) 18170 PLOT33+AA,17,B$(0):PLOT33+AA,18,B$(0) 19000 PRINTCHR$(30) 19010 PRINTCHR$(4); 19015 PRINTCHR$(27)"A"; 19020 PRINTCHR$(27)"J"SPC(2-(2*AA))B$(1);SPC(2)B$(2);SPC(2)B$(3);SPC(2)B$(4); 19030 PRINTSPC(2)B$(5);SPC(2)B$(6) 19040 PRINTCHR$(4):PRINT 19050 PRINT:PRINTSPC(2)"maxi:";SPC(2)"800";SPC(3)"500";SPC(3)"300"; 19060 PRINTSPC(2)"2000 " 19200 GOSUB10500 19300 WAIT200 19900 RETURN 21000 REM.....................FUSION 21010 PLOT3+AA,22,16:PLOT17+AA,22,16 21090 FORI=1TO20 21100 SOUND1,500,13:INK1 21110 WAIT50 21120 SOUND1,100,13:INK0:WAIT50 21130 NEXTI 21135 PLAY0,0,0,0 21140 CLS:INK2 21150 RETURN 22000 REM.....................DOMMAGES 22010 RT=25:T7=25 22020 XT=25:T8=25 22030 CT=25:T9=25 22040 DMGE=DMGE+2*RD+ED+PD+XD+SD+GD 22050 MD=4+3*(10*(-(RD>3))-(ED>3)-(PD>3)-(SD>3))+2*PB+2*SB+3*XB+3*GB 22060 JOUR=JOUR+MD:D4=JOUR:S=0:NC=0:NJ=0 22070 RD=0:ED=0:PD=0:SD=0:GD=0:PB=0:NH=0 22080 XB=0:GB=0:EF=0:PF=0:SF=0:XD=0:SB=0 22090 EV=390:PV=120:SV=120 22095 IFCO=1THENRETURN 22100 FORI=2TO5:POKE48000+I,17:NEXT 22110 FORI=6TO10:POKE48000+I,19:NEXT 22120 FORI=11TO39:POKE48000+I,18:NEXT 22130 FORI=1TO11 22140 PLOT22+AA,I+6,20 22150 NEXT 22200 RETURN 23000 REM....................FUSION 23010 GOSUB10700:CLS:INK0 23030 FORJ=1TO8:PRINT:NEXTJ 23040 PRINT" @@@@ @ @ @@@@ @ @@@@ @ @" 23050 PRINT" @ @ @ @ @ @ @ @@ @" 23060 PRINT" @@ @ @ @@@@ @ @ @ @ @@" 23070 PRINT" @ @ @ @ @ @ @ @ @" 23080 PRINT" @ @@@@ @@@@ @ @@@@ @ @" 23100 GOSUB21000 23150 IFRD>6THEN23210 23160 PRINT:PRINT:PRINT"Le coeur du reacteur vient d'etre de- truit par un accr oissement "; 23170 PRINT"incontrole de la temperature." 23180 PRINT"Heureusement le batiment de confine- ment n'a pas encore "; 23190 PRINT"ete endommage." 23200 GOTO23235 23210 PRINT:PRINT:PRINT"Il y a eu fusion du coeur du reacteur et cela a produit une "; 23220 PRINT"explosion de va-peur.Le batiment de confinement est endommage."; 23230 PRINT"Des gaz et debris radioactifs mortels s'en sont echappes." 23235 PRINT 23240 PRINTCHR$(27)" ";CHR$(27)"ACOMMENCEZ VOTRE PLAN D'EVACUATION" 23245 PRINT 23250 PRINT" Appelez une assistance medicale" 23260 GOSUB10300:CLS 23270 RETURN 25000 RETURN 29000 REM.......MUS.FIN 29010 T=30:N=10 29020 RESTORE:GOSUB30000 29050 RETURN 30000 REM....................MUSIQUE 30010 P=9:E=7:M=50 30020 FOR I=1 TO N 30030 READ O,N,D 30035 IF O=8 THEN 30070 30040 PLAY3,0,E,M 30050 MUSIC 1,O,N,P 30060 MUSIC 2,O-1,N,P 30070 WAIT D*T:PLAY0,0,0,0:NEXT I 30080 RETURN 30090 DATA3,1,1,3,6,1,3,10,1,4,1,2,3,10,1,4,3,3,4,1,1,3,10,1,3,6,1,3,10,3 30100 DATA3,5,4,3,8,4,3,5,4,3,10,8,3,8,4,3,5,4,3,1,4,3,3,4,2,10,4,3,1,8 30110 DATA 8,0,8,3,1,4,3,3,4,2,10,4,3,1,8,2,10,4,2,5,4,2,8,4,2,5,4,2,3,4 30120 DATA 2,5,8 30210 REM......................DEF CARACT 30220 DATA47063,47071,47079,46375,46383,46343,46359,46591,46839,46815 31000 DATA 8,8,8,8,42,20,8,0 31010 DATA 32,56,62,62,62,62,56,32,1,7,31,31,31,31,7,1 31020 DATA0,0,0,0,1,1,7,31,1,1,7,31,63,63,63,63 31030 DATA 31,7,1,1,0,0,0,0,63,63,63,63,31,7,1,1 31040 DATA 63,63,63,63,63,63,63,63,0,0,63,14,14,63,0,0 31050 DATA 18,18,30,30,30,30,18,18