REM TRON BY CHRISTIAN PETER 0561-59145 REM IDEE AUS >DAS SUPER GRAFIK BUCH REM ZUM ATARI ST< on error goto 1100 dim h$(5),h(5) 5Randomize open"I",1,"HYSCORE.DAT" for i=1 to 4 input#1,h$(i) input#1,h(I) next i close#1 xa=120 ya=64 cls sp=50 ' Initialisierung x=-1 y=0 zaehler=0 a=xa/2 b=ya/2 time=timer anzahl=10 screen 6 PGLOAD "TRON2.PIC" 'Hauptschleife (Bewegung) 10 REM Schleife c$=inkey$ c=asc(c$) if c=72 then gosub 100 if c=80 then gosub 110 if c=75 then gosub 120 if c=77 then gosub 130 'Weiterbewegung a=a+x b=b+y if a<1 or a>xa or b<1 or b>ya then gosub 200 if point(a,b)<>0 then gosub 300 pset (a,b),1 goto 10 100 x=0:y=-1:return 110 x=0:y=1:return 120 x=-1:y=0:return 130 x=1:y=0:return 200 gosub 300:goto 10 300 REM Kollision SOUND 55,10 a=int(rnd*xa) b=int(rnd*ya) zaehler=zaehler+1 if zaehler=anzahl then goto 400 return 400 REM Schluss cls time=int((timer-time)) scr=(time/anzahl) screen 7 print" K e i n e P a n i k ! ! !" print" Durchhaltezeit: ";time;" Sekunden" print" Rundenzahl: ";anzahl print" Rundendurchschnitt: ";scr;" sek/Runde" repeat until inkey$<>"" for i=1 to 4 if scr>h(i) then goto 1000 next i 500 open"O",1,"HYSCORE.DAT" locate 1,14,0:?" HIGHSCORE " box 2,14,7,25,1 for i=1 to 4 write#1,h$(I) write#1,h(I) locate 2+i,15,0 ?h$(i);" ";h(i) next i close#1 locate 8,1 input "Nochmal (J/N)";n$ if n$="J" or n$="j" then goto 5 repeat locate 8,1,1 until inkey$="" cls end 1000 REM ?" Eine gute Zeit!" input " Ihr Name ? (max 5 Buchstaben)";name$ cls for j=4 to i step-1 h(j+1)=h(j) h$(j+1)=h$(j) next j h(i)=scr h$(i)=name$ goto 500 1100 rem Errorroutine screen 7 Print "Nichbehebarer Fehler !" end