-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschedule.h
More file actions
executable file
·48 lines (43 loc) · 1.4 KB
/
Copy pathschedule.h
File metadata and controls
executable file
·48 lines (43 loc) · 1.4 KB
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
#pragma once
#include "team.h"
#include "game.h"
#include <QList>
class schedule
{
private:
QString _filename;
int _num_games;
int _max_teams;
QList<team*> _teams;
QList<game*> _games;
QList<int> _bash;
QList<int> _finesse;
enum alternate_sched { sched_fine
, sched_alt_odd
, sched_alt_even
};
public:
schedule(QString filename, int num_games);
~schedule(void);
int generate();
int generate18for10();
int generate12for10();
int generate5for6();
int addTeam(team* team1);
int numberTeams(){return _teams.count();}
int generateGames(int day, QList<game*>* dayGames, const QList<team*>* home, const QList<team*>* away );
void shiftScheduleRight( QList<team*>* home );
void shiftScheduleLeft( QList<team*>* home );
void shiftAltScheduleRight( QList<team*>* home );
void shiftAltScheduleLeft( QList<team*>* home );
void printSchedule( QString header, QList<game*> daySched );
bool validateSchedule();
bool validateGames();
int getGameCount(team* team1);
int getAwayGameCount(team* team1);
int getHomeGameCount(team* team1);
int getBashGameCount(team* team1);
int getFinesseGameCount(team* team1);
int getStyleGameCount(team* team1, int* bash, int* finesse);
bool verifyTeam(team* team1);
};