Commit 29e356ef authored by Kyle Malaguit's avatar Kyle Malaguit

autosave

parent e8d9c884
NAME SCORE NAME SCORE
Mal 54234 Mal 54234
BVB 9240 bvd 10000
BND 6564 vds 10000
CDS 6544 NEL 10000
NKV 5453 PHI 10000
KAL 2434 BAG 10000
BVB 9240
BND 6564
CDS 6544
NKV 5453
KAL 2434
...@@ -16,9 +16,12 @@ void SaveLoad::pushBackNewScoreAndSort(Scores Score){ ...@@ -16,9 +16,12 @@ void SaveLoad::pushBackNewScoreAndSort(Scores Score){
void SaveLoad::displayScores(){ void SaveLoad::displayScores(){
cout << "Rank" << "\t\t" << "Name" << "\t\t" << "Score" << endl; cout << "Rank" << "\t\t" << "Name" << "\t\t" << "Score" << endl;
for (int i = 0; i < 10; i ++){ int i = 1;
for (auto score : scores){
cout << i+1 << "\t\t" << scores.at(i).getName() << "\t\t" << scores.at(i).getScore() << endl; cout << i++ << "\t\t" << score.getName() << "\t\t" << score.getScore() << endl;
if(i == 11){
break;
}
} }
} }
......
...@@ -11,7 +11,7 @@ using namespace std; ...@@ -11,7 +11,7 @@ using namespace std;
int main(){ int main(){
//check for valid username //check for valid username
// char userName[3]; // char userName[3];
SLSnake second; SL2048 second;
second.LoadContainers(); second.LoadContainers();
second.userInputNameMakeScore(10000); second.userInputNameMakeScore(10000);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment