-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tournament.h
70 lines (55 loc) · 1.83 KB
/
Tournament.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef TOURNAMENT_H
#define TOURNAMENT_H
#include <iostream>
#include <vector>
#include <memory>
#include <algorithm>
#include <iomanip>
#include <string>
#include <chrono>
#include <thread>
#include <map>
#include <iterator>
#include <stdio.h> /* printf, scanf, puts, NULL */
#include <stdlib.h> /* srand, rand */
#include <time.h>
#include "Game.h"
#include "Match.h"
#include "Player.h"
#include "Round.h"
#include "GetEntry.h"
class Tournament {
private:
std::string tournamentName;
std::vector<std::shared_ptr<Player>> listOfAllPlayers;
std::vector<std::shared_ptr<Round>> listOfRounds;
public:
static int getEntry();
Tournament();
Tournament(std::string &name);
std::vector<std::shared_ptr<Player>> getListOfPlayers();
std::vector<std::shared_ptr<Round>> getListOfRounds();
std::string getTournamentName();
void setName(std::string &name);
//BELOW ARE QT SPECIFIC FUNCTIONS FOR TOURNAMENT
void registerPlayer(std::shared_ptr<Player> player);
int getTournamentSize();
QString getPlayerName(int x);
int getNumberOfPlayers();
void addRound();
void addRound(QString roundName);
void addRound(std::shared_ptr<Round> roundToAdd);
void deletePlayer(int arrayIndex);
std::shared_ptr<Round> getRound(int x);
void deserializeTournament(QString folder_name);
void deserializeTournamentName(QString path);
void deserializeTournamentPlayers(QString path);
void deserializeAllRounds(QString path);
void serializeTournament();
QString createTournamentFolder(QString path);
void serializeTournamentPlayers(QString path);
void serializeTournamentName(QString path);
QString createRoundsFolder(QString path);
void scoreSort();
}; //end Tournament class
#endif //TOURNAMENT_H