Skip to content
Snippets Groups Projects
Commit 1cde2318 authored by aurora's avatar aurora
Browse files

fix: bracket mistakes

parent 19e1a4ad
No related branches found
No related tags found
No related merge requests found
......@@ -28,9 +28,9 @@ public:
} else return false; };
void writePlayer() const;
void updatePlayer();
int playerWin() {wins = 0;};
int playerDraws() {draws = 0;};
float playerScore() {score = 0;};
void playerWin() {wins = 0;};
void playerDraws() {draws = 0;};
void playerScore() {score = 0;};
void calculateScore();
void writeToFilePlayer(ofstream & out);
void readFromFilePlayer(ifstream & in);
......@@ -164,7 +164,7 @@ Player* findPlayerID(const int ID) {
}
}
}
/**
* Calculates the score for a single player
*
......@@ -243,7 +243,7 @@ void Tournament::fillTableArray(){
void Tournament::writeToFileTournament(ofstream & out){
for(int i=0; i<gTables; i++){
out<< setw(STRLEN) <<player1[i]
out<< player1[i]
<< setw(STRLEN) <<player2[i]
<< setw(STRLEN) <<tableNr[i]
<< "\n";
......@@ -306,7 +306,7 @@ else if(result == 'D'){
* @see - calculateScore()
*/
void viewResults(){
int temp[gPlayers.size();
int temp[gPlayers.size()];
for(int i=0; i < gPlayers.size();i++){
gPlayers[i]->calculateScore(); //Calculates score for every player
......@@ -332,9 +332,6 @@ for(int i=0; i<gPlayers.size(); i++){ //For MVP-purposes no scores can be iden
}
}
/**
* Create a new tournament, with black and white players and what table they're playing at
* @see writeTournament()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment