Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <utility>
- #include <string>
- #include <vector>
- //#include "game.h"
- using namespace std;
- class Score {
- public:
- pair<string, int> scorePair;
- // Constructors
- Score();
- Score(string name);
- Score(int score);
- Score(string name, int score);
- // Member functions
- //bool sortScores(const pair<string, int>& s1, const pair<string, int>& s2);
- //int calculateScore(Game g, bool playerWon);
- //vector<Score> readScores(string fileName);
- //void writeScores(vector<Score>);
- };
- // player.cpp
- #include "player.h"
- #include <string>
- #include <vector>
- using namespace std;
- // Constructors
- Score::Score() {
- this->scorePair = make_pair("NULL",0);
- }
- Score::Score(string name) {
- this->scorePair = make_pair(name, 0);
- }
- Score::Score(int score) {
- this->scorePair = make_pair("NULL", score);
- }
- Score::Score(string name, int score) {
- this->scorePair = make_pair(name, score);
- }
- // Member functions
- //bool Score::sortScores(const pair<string, int>& s1, const pair<string, int>& s2) {}
- //int Score::calculateScore(Game g, bool playerWon) {}
- //void Score::writeScores(vector<Score> scores) {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement