Game Class Reference
Contains the data of one game.
More...
#include <game.h>
List of all members.
Classes |
struct | Bracket |
struct | Result |
Public Member Functions |
| Game (void) |
| Game (int ID, Team *team1, Team *team2, int result[2]) |
| Game (int ID, Team *team1, Team *team2, int result[2], Game *leftChild, Game *rightChild) |
| Game (int ID, Team *team1, Team *team2, int result[2], QString date, QString descr) |
| ~Game (void) |
struct Bracket | getBracket (void) const |
int | getID (void) const |
int | getState (void) const |
QString | getDate (void) |
QString | getDescr (void) |
Team * | getTeam (int teamnum) const |
struct Result | getResult (void) const |
Game * | getChild (int dir) const |
bool | isChildGamesDecided (void) |
int | getTeam1 (void) |
int | getTeam2 (void) |
Team * | getTeam1Direct (void) |
Team * | getTeam2Direct (void) |
void | setBracket (int y0, int dy, int ylink, int level, int dir, int dashOffset, QPen pen) |
void | setBracket (int y0, int dy, int ylink, int dashOffset) |
void | setTeam (int teamnum, Team *team) |
void | setTeams (Team *team1, Team *team2) |
void | setResult (int score[2]) |
void | setChilds (Game *leftChild, Game *rightChild) |
void | setPen (QPen pen) |
void | setPenColor (int val) |
Static Public Attributes |
static const int | UNDECIDED = 0 |
| Game is undecided.
|
static const int | WINTEAM1 = 1 |
| Team 1 wins.
|
static const int | WINTEAM2 = 2 |
| Team 2 wins.
|
static const int | LEFTCHILD = 0 |
| Left child game.
|
static const int | RIGHTCHILD = 1 |
| Right child game.
|
static const int | UNDEFINED = 0 |
| Game has no child games.
|
Private Attributes |
int | ID |
Team * | team1 |
Team * | team2 |
struct Result | result |
struct Bracket | bracket |
Game * | leftChild |
Game * | rightChild |
QString | date |
QString | descr |
Detailed Description
Contains the data of one game.
This class contains all informations that is needed for a game, as the two opponents, the result, the date, etc. It also contains some informations about the position in the canvas (which game is the left/right one, which coordinates does the game have) and informations who has won, etc.
Definition at line 18 of file game.h.
Constructor & Destructor Documentation
Game::Game |
( |
int |
ID, |
|
|
Team * |
team1, |
|
|
Team * |
team2, |
|
|
int |
result[2] | |
|
) |
| | |
Game::Game |
( |
int |
ID, |
|
|
Team * |
team1, |
|
|
Team * |
team2, |
|
|
int |
result[2], |
|
|
Game * |
leftChild, |
|
|
Game * |
rightChild | |
|
) |
| | |
Game::Game |
( |
int |
ID, |
|
|
Team * |
team1, |
|
|
Team * |
team2, |
|
|
int |
result[2], |
|
|
QString |
date, |
|
|
QString |
descr | |
|
) |
| | |
Member Function Documentation
Game * Game::getChild |
( |
int |
dir |
) |
const |
Returns a child of this Game. dir = 0: leftchild dir = 1: rightchild
Definition at line 119 of file game.cpp.
QString Game::getDate |
( |
void |
|
) |
|
QString Game::getDescr |
( |
void |
|
) |
|
int Game::getID |
( |
void |
|
) |
const |
int Game::getState |
( |
void |
|
) |
const |
Team * Game::getTeam |
( |
int |
teamnum |
) |
const |
Returns the Team with teamnum 1 or 2.
Definition at line 73 of file game.cpp.
int Game::getTeam1 |
( |
void |
|
) |
|
Team * Game::getTeam1Direct |
( |
void |
|
) |
|
int Game::getTeam2 |
( |
void |
|
) |
|
Team * Game::getTeam2Direct |
( |
void |
|
) |
|
bool Game::isChildGamesDecided |
( |
void |
|
) |
|
Returns if the Games of the children are decided yet.
Definition at line 127 of file game.cpp.
void Game::setBracket |
( |
int |
y0, |
|
|
int |
dy, |
|
|
int |
ylink, |
|
|
int |
dashOffset | |
|
) |
| | |
void Game::setBracket |
( |
int |
y0, |
|
|
int |
dy, |
|
|
int |
ylink, |
|
|
int |
level, |
|
|
int |
dir, |
|
|
int |
dashOffset, |
|
|
QPen |
pen | |
|
) |
| | |
void Game::setChilds |
( |
Game * |
leftChild, |
|
|
Game * |
rightChild | |
|
) |
| | |
void Game::setPen |
( |
QPen |
pen |
) |
|
void Game::setPenColor |
( |
int |
val |
) |
|
void Game::setResult |
( |
int |
score[2] |
) |
|
void Game::setTeam |
( |
int |
teamnum, |
|
|
Team * |
team | |
|
) |
| | |
void Game::setTeams |
( |
Team * |
team1, |
|
|
Team * |
team2 | |
|
) |
| | |
Member Data Documentation
Left child game.
Definition at line 50 of file game.h.
Right child game.
Definition at line 52 of file game.h.
Game has no child games.
Definition at line 54 of file game.h.
The documentation for this class was generated from the following files:
- C:/Users/admin/Documents/Visual Studio 2008/Projects/AdaptiviTree/AdaptiviTree/game.h
- C:/Users/admin/Documents/Visual Studio 2008/Projects/AdaptiviTree/AdaptiviTree/game.cpp