Bookmark Topic Watch Topic
  • New Topic

Leaderboard help  RSS feed

 
Grace Loughran
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator



- Am I correct with my algorithm: Load the info first from the .txt file, add them up together with the current players' info, sort them all, overwrite the .txt file with the new info, then display them (only the top 5 though)?

- As of now this bunch of code only gathers up data from the txt file, adds up the info from the winner of the current game (which in the current code the name is String and the score is 40), and overwrites the .txt file with both the old& new info. I'm now about to work on how to sort all the stuff, but I'm not sure how I will add up altogether the info from the file and the info from the current players and add them into a single list to be sorted. I probably should get rid of the two ArrayLists but again I'm not sure how I will proceed from that.

- Wow I'm a mess, my head is about to explode and help would be hugely appreciated right now
 
Tim Cooke
Marshal
Posts: 4051
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Did you mean to post this as a new topic? Or did you mean to add it to your previous thread on the same topic?
 
Grace Loughran
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator
Tim Cooke wrote:Did you mean to post this as a new topic? Or did you mean to add it to your previous thread on the same topic?


Yes that was what I intended to do but I'm new here so yeah
I mean I intended to add it to my previous thread but I wasnt sure if people would see it if you know what i mean
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Report post to moderator
Grace Loughran wrote:I mean I intended to add it to my previous thread but I wasnt sure if people would see it if you know what i mean

Which could also mean people wasting their time giving you answers that you had already been given in the other thread.
 
Tim Cooke
Marshal
Posts: 4051
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
I would certainly recommend continuing with your original thread. As Stuart says, folks who are unaware of your original thread may give you the same advice over again which is a waste of time for everybody. But also forum posters can be fickle creatures and may construe your abandonment of the original thread to be a disregarding of the help you have received there thus reducing the chances of you getting further help in the future.

Your intent is understood in this instance so we can all continue as friends..... in your original thread of course.

When you reply to a thread it gets bumped to the top of the "Recent Topics" list which is where I, and I assume most other regular posters, hang out. So we'll see it alright.
 
Grace Loughran
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator
Stuart A. Burkett wrote:
Grace Loughran wrote:I mean I intended to add it to my previous thread but I wasnt sure if people would see it if you know what i mean

Which could also mean people wasting their time giving you answers that you had already been given in the other thread.


Well it's somehow related to my previous thread but this time I'm encountering something more specific so I thought to start a new thread but okay thanks for pointing this out!
 
Grace Loughran
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator
Tim Cooke wrote:I would certainly recommend continuing with your original thread. As Stuart says, folks who are unaware of your original thread may give you the same advice over again which is a waste of time for everybody. But also forum posters can be fickle creatures and may construe your abandonment of the original thread to be a disregarding of the help you have received there thus reducing the chances of you getting further help in the future.

Your intent is understood in this instance so we can all continue as friends..... in your original thread of course.

When you reply to a thread it gets bumped to the top of the "Recent Topics" list which is where I, and I assume most other regular posters, hang out. So we'll see it alright.

Okay! Really sorry for the mess, still trying to find my way around. Thanks!
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Report post to moderator
No problem. That's why folks new to the site are labelled "greenhorns" - so old-timers go easy on them

Closing this thread, please continue the discussion over at http://www.coderanch.com/t/629466/java/java/Creating-leaderboard.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!