~ubuntu-branches/ubuntu/jaunty/bygfoot/jaunty

« back to all changes in this revision

Viewing changes to src/table_struct.h

  • Committer: Bazaar Package Importer
  • Author(s): Isaac Clerencia
  • Date: 2005-07-05 23:53:40 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050705235340-akpef5bdm7gsm9m4
Tags: 1.9.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef TABLE_STRUCT_H
 
2
#define TABLE_STRUCT_H
 
3
 
 
4
#include "bygfoot.h"
 
5
#include "team_struct.h"
 
6
 
 
7
/**
 
8
   Table element values.
 
9
   @see TableElement
 
10
   @see Table
 
11
*/
 
12
enum TableElementValues
 
13
{
 
14
    TABLE_PLAYED = 0,
 
15
    TABLE_WON,
 
16
    TABLE_DRAW,
 
17
    TABLE_LOST,
 
18
    TABLE_GF,
 
19
    TABLE_GA,
 
20
    TABLE_GD,
 
21
    TABLE_PTS,
 
22
    TABLE_END
 
23
};
 
24
 
 
25
/**
 
26
   An element representing a team in the tables.
 
27
   @see Table
 
28
   @see #TableElementValues
 
29
*/
 
30
typedef struct
 
31
{
 
32
    Team *team;
 
33
    gint team_id;
 
34
    /** The rank of the element before the last update. 
 
35
        Used to display an arrow if the rank changed. */
 
36
    gint old_rank;
 
37
    gint values[TABLE_END];
 
38
} TableElement;
 
39
 
 
40
/**
 
41
   A table belonging to a league or a cup with round robin.
 
42
   @see TableElement
 
43
*/
 
44
typedef struct
 
45
{
 
46
    GString *name;
 
47
    gint clid;
 
48
    /** The cup round (or -1 if it's a league). */
 
49
    gint round;
 
50
    GArray *elements;
 
51
} Table;
 
52
 
 
53
#endif