bygfoot/src/league.h

68 lines
1.5 KiB
C
Raw Normal View History

#ifndef LEAGUE_H
#define LEAGUE_H
2004-12-23 13:58:39 +01:00
#include "bygfoot.h"
#include "league_struct.h"
2005-03-19 21:04:08 +01:00
#include "fixture_struct.h"
2004-12-23 13:58:39 +01:00
2005-03-27 19:59:57 +02:00
#define league_cup_get_teams(clid) (clid < ID_CUP_START) ? league_from_clid(clid)->teams : cup_from_clid(clid)->teams
#define league_cup_get_fixtures(clid) (clid < ID_CUP_START) ? league_from_clid(clid)->fixtures : cup_from_clid(clid)->fixtures
2005-04-07 23:10:31 +02:00
#define league_cup_get_name_string(clid) (clid < ID_CUP_START) ? league_from_clid(clid)->name->str : cup_from_clid(clid)->name->str
#define league_cup_get_yellow_red(clid) (clid < ID_CUP_START) ? league_from_clid(clid)->yellow_red : cup_from_clid(clid)->yellow_red
2005-03-27 19:59:57 +02:00
2004-12-23 13:58:39 +01:00
League
league_new(void);
PromRelElement
prom_rel_element_new(void);
gint
league_new_id(void);
2005-01-09 21:21:22 +01:00
TableElement
league_table_element_new(Team *team);
gint
league_cup_get_index_from_clid(gint clid);
League*
league_from_clid(gint clid);
2005-03-14 18:47:27 +01:00
gint
league_cup_get_next_clid(gint clid);
gint
league_cup_get_previous_clid(gint clid);
Fixture*
league_cup_get_next_fixture(gint clid, gint week_number, gint week_round_number);
Fixture*
league_cup_get_previous_fixture(gint clid, gint week_number, gint week_round_number);
gint
league_get_index(gint clid);
2005-03-16 21:48:25 +01:00
gint
league_cup_average_capacity(gint clid);
2005-04-13 15:01:59 +02:00
void
league_get_team_movements(League *league, GArray *team_movements);
gint
league_index_from_sid(const gchar *sid);
void
league_remove_team_with_id(League *league, gint id);
void
league_season_start(League *league);
gboolean
query_league_rank_in_prom_games(const League *league, gint rank);
gboolean
query_league_prom_games_begin(const League *league);
2004-12-23 13:58:39 +01:00
#endif