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

Organizing code

parent dcd16e19
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@
#include <fstream> // ifstream, ofstream
#include "LesData2.h"
#include "player.h"
#include "functions.h"
using namespace std;
......@@ -47,9 +48,12 @@ void Tournament::startNewTournament()
void Tournament::enterResults()
{
for (int i = 0; i < nrOfTables; ++i)
{
}
}
void Tournament::printTables()
{
......@@ -59,6 +63,31 @@ void Tournament::printTables()
<< " please add or remove players so that there is exactly two players per table." << endl;
return;
}
white.clear();
black.clear();
currentRound++;
if(currentRound==1)
{
vector<Player*> playersPlaying = playerList;
for (int i = 0; i < nrOfTables; ++i)
{
white.push_back(playersPlaying[playersPlaying.size()-1]->playerID);
playersPlaying.pop_back();
black.push_back(playersPlaying[playersPlaying.size()-1]->playerID);
playersPlaying.pop_back();
cout << endl << "Table " << i << ": \t"
<<
}
}
else
{
vector<Player*> playersPlaying = sortedRankings;
sortRanking();
do {
}while(playersPlaying > 0);
}
}
bool Tournament::canStartRound()
......
......@@ -11,6 +11,7 @@ int searchByID(int id, int list)
vector<Player*> listToUse;
if (list == 1)
{
listToUse=playerList;
}
else if (list == 2)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment