Computer Science Canada

Scoring

Author:  bigr [ Mon Apr 19, 2004 9:50 am ]
Post subject:  Scoring

I have a worm game and Im wondering how you can have a scoring system which saves high scores to a file. Allowing the high scores to be shown every time you start the game

Author:  EDEN-E [ Mon Apr 19, 2004 11:12 am ]
Post subject:  Re: Scoring

code:
var f : int
var top : int

% to get topscore from data.txt file
open : f, "data.txt", get
    get : f, top
close : f

% to write
open : f, "data.txt", put
    put : f, top
end for


of course there are much more function for file io...

if you need more about file io, i suggest you to look up Turing Reference (F10)

Author:  Tony [ Mon Apr 19, 2004 12:34 pm ]
Post subject: 

turing reference is useless for most parts... they give bad examples that sometimes don't even work Confused

I know we've got a good tutorial on file i/o... it was like one of the first ones posted Laughing


: