fb:porticula NoPaste
highscore - funzt net
Uploader: | The_Muh |
Datum/Zeit: | 14.01.2008 16:41:41 |
sub highscore(punkteN as integer, laengeN as integer)
dim punkte(1 to 10) as integer
dim nam(1 to 10) as string
dim laenge(1 to 10) as integer
dim as integer i, i2, i3
open "highscore.dat" for random as #1
for i = 1 to 10
input #1 ,Punkte(i), laenge(i), nam(i)
next i
for i2 = 1 to 10
if PunkteN < punkte(i) then
for i3 = i2 to 10
punkte(i3) = punkte(i3+1)
nam(i3) = nam(i3+1)
laenge(i3) = laenge(i3+1)
next i3
Punkte(i2) = PunkteN
laenge(i2) = laengeN
input "Name eingeben:", Nam(i2)
exit for
end if
next i2
for i = 1 to 10
write #1, Punkte(i), laenge(i), nam(i)
next
end sub