Skip to content
Snippets Groups Projects
Commit a0dcf355 authored by TheHresvelgian's avatar TheHresvelgian
Browse files

commenting

parent 4e744363
No related branches found
No related tags found
No related merge requests found
...@@ -22,17 +22,18 @@ class Tournament ...@@ -22,17 +22,18 @@ class Tournament
{ {
public : public :
int nrOfTables; int nrOfTables; //amount of tables in the tournament
int currentRound; int currentRound; //which round we are currently in, is updated in Tournament::printTables
int nrOfRounds; int nrOfRounds; //amount of rounds the tournament has total
vector<int>white; vector<int>white; //id of the players with white pieces in the current round, so white[0] is the id of the player with white pieces on table 1
vector<int>black; vector<int>black; //id of the players with black pieces in the current round, so black[0] is the id of the player with black pieces on table 1
//white and black are reset each round, but still needs to be saved
virtual void enterResults(); //+
virtual void endTournament(); //+ virtual void enterResults(); //Enters the results after a round, goes through each table and asks the result before allowing the next round to start
virtual void printTables(); //+ virtual void endTournament(); //Goes if currentround is the final round, prints the final results
virtual void createMatchups();//+ virtual void printTables(); //Calls createMatchups and prints the tables
bool canStartRound();//+ virtual void createMatchups();//Figures out who should play against each other
bool canStartRound();//Controls that the amount of tables and players correspond
void writeToFileTournament(ofstream &out); //- void writeToFileTournament(ofstream &out); //-
void readFromFileTournaments(ifstream &in); //- void readFromFileTournaments(ifstream &in); //-
......
...@@ -26,8 +26,8 @@ class Player ...@@ -26,8 +26,8 @@ class Player
float score; float score;
vector <int> results; //stores the results of each match, 0 for loss, 1 for draw and 2 for win vector <int> results; //stores the results of each match, 0 for loss, 1 for draw and 2 for win
vector <Player*> playedAgainst; vector <Player*> playedAgainst; //has every person they have played against
vector<bool> wasWhite; vector<bool> wasWhite; //true for each round the player had white pieces, false for black
Player(); Player();
Player(string name, string surName, string clubName, int rating, int playerID, float score); Player(string name, string surName, string clubName, int rating, int playerID, float score);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment