1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2024-12-19 19:53:50 +01:00
bygfoot/src/table_struct.h

79 lines
1.8 KiB
C
Raw Normal View History

2005-10-20 17:45:00 +02:00
/*
2005-11-26 17:52:51 +01:00
table_struct.h
2005-10-20 17:45:00 +02:00
Bygfoot Football Manager -- a small and simple GTK2-based
football management game.
http://bygfoot.sourceforge.net
Copyright (C) 2005 Gyözö Both (gyboth@bygfoot.com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef TABLE_STRUCT_H
#define TABLE_STRUCT_H
2005-01-09 21:21:22 +01:00
#include "bygfoot.h"
#include "team_struct.h"
/**
Table element values.
@see TableElement
@see Table
*/
enum TableElementValues
{
TABLE_PLAYED = 0,
TABLE_WON,
TABLE_DRAW,
TABLE_LOST,
TABLE_GF,
TABLE_GA,
TABLE_GD,
TABLE_PTS,
TABLE_END
};
/**
An element representing a team in the tables.
@see Table
@see #TableElementValues
*/
typedef struct
{
2005-01-09 21:21:22 +01:00
Team *team;
2005-04-13 15:01:59 +02:00
gint team_id;
2005-05-02 16:39:30 +02:00
/** The rank of the element before the last update.
Used to display an arrow if the rank changed. */
gint old_rank;
gint values[TABLE_END];
} TableElement;
/**
A table belonging to a league or a cup with round robin.
@see TableElement
*/
typedef struct
{
2005-10-09 11:35:44 +02:00
gchar *name;
2005-01-09 21:21:22 +01:00
gint clid;
/** The cup round (or -1 if it's a league). */
gint round;
GArray *elements;
} Table;
#endif