main.cpp 1.1 KB
Newer Older
Kyle Malaguit's avatar
Kyle Malaguit committed
1 2 3 4 5 6 7 8 9 10 11 12
#include "SaveLoad.h"
#include "Scores.h"
#include <cstring>
#include <stdexcept>
#include <iostream>
#include <fstream>
#include "SL2048.h"
#include "SLSnake.h"
using namespace std;

int main(){
    //check for valid username
Kyle Malaguit's avatar
Kyle Malaguit committed
13
    // char userName[3];
Kyle Malaguit's avatar
Kyle Malaguit committed
14 15 16
    SLSnake second;
    second.LoadContainers();
    
Kyle Malaguit's avatar
Kyle Malaguit committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30
    // cout << "Enter a username with a length of 3 characters\n";
    // cin >> userName;
    // //here is a temporary score input system
    // //in the final project the score will be taken automatically from the system.
    // int score;
    // cout << "Enter a score: ";
    // cin >> score;
    // cout << endl;
    
    // Scores score1(userName, score);
    // second.pushBackNewScoreAndSort(score1);
    // second.updateFile();
    
    // second.displayScores();
Kyle Malaguit's avatar
Kyle Malaguit committed
31
    
Kyle Malaguit's avatar
Kyle Malaguit committed
32 33 34
    second.userInputNameMakeScore(1000);
    
    second.updateFile();
Kyle Malaguit's avatar
Kyle Malaguit committed
35
    second.displayScores();
Kyle Malaguit's avatar
Kyle Malaguit committed
36
    
Kyle Malaguit's avatar
Kyle Malaguit committed
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
        
    
    
    return 0;
}

// SL2048 first;

// first.LoadContainers();
// first.sortByScore();
// first.updateFile();

//
// Scores score1("BND" , 6564, "3/9/19");
// second.pushBackNewScoreAndSort(score1);
// second.updateFile();