Talk:A-level Computing 2009/AQA/Problem Solving, Programming, Data Representation and Practical Exercise/Skeleton code/2011 Exam/Section D

Bubble sort doesnt work! If you load top scores and then play a game and get a high scores how can your display top scores from highest to lowest?
 * You must be able to launch the bubble sort procedure from the menu screen. This involves you adjusting the code to handle option 5. See the Reset Top Scores section on how to add this option.  Let me know if you need any more help.  I have it working fine here. Pluke (discuss • contribs) 23:27, 14 April 2011 (UTC)


 * Okay, so first i get option 5 to work then what do i do.. Once running the program what do i do? Thanks for your help!
 * So how do i get it to work?? First i get option 5 to work then what?? Once i load the program and enter both names what do i do next. Please help!
 * Thanks man


 * You need to copy the code of the bubble sort into your code listing (learn it, learn what it does). Then you need to add a fifth menu option Case 5 : bubbleSort(TopScores)
 * make sure that you then adjust all three menu option checks to allow for the 5th option
 * Loop Until (OptionSelected >= 1 And OptionSelected <= 5) Or OptionSelected = 9 ...... etc
 * Pluke (discuss • contribs) 16:06, 18 April 2011 (UTC)

Okay ive copied the bubble sort into my program, now what do i do? Okay adding option 5 what does it do? Does it reset topscores or does it display in order?

Thanks man

Before you read the following please try and look at the Reset Top Scores explanation on the Task D page.

Ok just realised something on the task d page case 5 says resettopscores(topscores) and the one you posted says bubblesort(topscores) so which one do i apply? Thanks for all the help soo far! much appreciated
 * Start from fresh, and use case 5. You could always try to call it case 6.  It'll be good practice to get both 5 and 6 working at the same time Pluke (discuss • contribs) 22:12, 22 April 2011 (UTC)

Ok, so case 5 will be bubble sort and case 6 should be resting all scores loaded to 0 right?
 * try that, you should be comfortable with doing both. Let me know if you need any more help on this Pluke (discuss • contribs) 14:56, 24 April 2011 (UTC)

Ok thanks got it working now! Can you help me on something else now? What can i do if a game is drawn? What should i do? For example i play and both users get a score of 30? What should happen? ALso if for example on of the players gets a high score of 45 and there is already a high score of 45 in the topscores table what should happen? Thanks
 * First of all test out the drawn situation and the 45 situation by using manual inputs. What happens, what do we need to do?  This might involve a little code. Pluke (discuss • contribs) 22:36, 1 May 2011 (UTC)

CSV
Can someone confirm what is meant to happen to the function of saving csv? If you load topscores there are four players. Now if two new people play and get two new highscores its meant to replace the lowest scores on the topscores file right? But is it meant to replace it temporarily just in while your playing the game? for example say if ur playing and get 2 topscores during the game it will replace the lowest topscores, but once you quit the game those topscores are gone. Now i want to know do you need to replace the new topscores on the actual textfile?? like i said before if i get a topscore and quit the game, is it possible to store the new topscores on the actual hiscores.txt file?? so when you start a new game next time and load the topscores it will have you in the file? Does that need to happen? If so how?? Please help! Thanks