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

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




PostPosted: Tue Jun 09, 2009 3:31 pm   Post subject: highscore

would some one explain to me how i could do a highscore mainly the basics?
Sponsor
Sponsor
Sponsor
sponsor
jernst




PostPosted: Tue Jun 09, 2009 3:45 pm   Post subject: Re: highscore

You need a way to store the highest score, or the highest 10 scores. You could do this with a file. At the end of the game you read the highest score in the file. You check if the score the player got is higher than that. If it is you make the player score the new highest score. You write the change into the file.
yodu123




PostPosted: Tue Jun 09, 2009 4:41 pm   Post subject: RE:highscore

now i am able to save the name of the player and also the score but i don`t know how to it for more than one
Tony




PostPosted: Tue Jun 09, 2009 8:11 pm   Post subject: RE:highscore

when you need more than one of anything, you should probably be using arrays -- see Turing Walkthrough
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  [ 4 Posts ]
Jump to:   


Style:  
Search: