Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Scoring
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bigr




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
EDEN-E




PostPosted: 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)
Tony




PostPosted: Mon Apr 19, 2004 12:34 pm   Post subject: (No 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
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: