Keeping high scores for pong
Ok, well ive written a pong game and now i need to incorporate the scoring into it. The game starts out where you enter your initials. Then at the end of the game it shows your score. Now im stuck on how im going to do this next part. Basically I need to have a file with 10 names and scores saved. If your score is bigger than any of the 10, it needs to input it into the file and sort that file from higest score to lowest. Now my question is would the easiest way to do this is to have two arrays? One for initials and one for scores? And then just write a swap function? Any ideas are greatly appreciated!