mirror of https://github.com/tstellar/bygfoot.git
Adjusted season history for multiple tables.
This commit is contained in:
parent
c48a361342
commit
f433683ec9
17
src/stat.c
17
src/stat.c
|
@ -178,19 +178,22 @@ stat_season_stat_new(gint season_number)
|
||||||
void
|
void
|
||||||
stat_create_season_stat(void)
|
stat_create_season_stat(void)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i, j;
|
||||||
SeasonStat new = stat_season_stat_new(season);
|
SeasonStat new = stat_season_stat_new(season);
|
||||||
ChampStat new_champ;
|
ChampStat new_champ;
|
||||||
|
|
||||||
for(i=0;i<ligs->len;i++)
|
for(i=0;i<ligs->len;i++)
|
||||||
{
|
{
|
||||||
new_champ.cl_name = g_strdup(lig(i).name);
|
for(j = 0; j < lig(i).tables->len; j++)
|
||||||
new_champ.team_name =
|
{
|
||||||
g_strdup(g_array_index(league_table((&lig(i)))->elements, TableElement, 0).team->name);
|
new_champ.cl_name = g_strdup(g_array_index(lig(i).tables, Table, j).name);
|
||||||
g_array_append_val(new.league_champs, new_champ);
|
new_champ.team_name =
|
||||||
|
g_strdup(g_array_index(g_array_index(lig(i).tables, Table, j).elements, TableElement, 0).team->name);
|
||||||
|
g_array_append_val(new.league_champs, new_champ);
|
||||||
|
}
|
||||||
|
|
||||||
g_array_append_val(new.league_stats, lig(i).stats);
|
g_array_append_val(new.league_stats, lig(i).stats);
|
||||||
lig(i).stats = stat_league_new(lig(i).name, lig(i).symbol);
|
lig(i).stats = stat_league_new(lig(i).name, lig(i).symbol);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i=0;i<acps->len;i++)
|
for(i=0;i<acps->len;i++)
|
||||||
|
|
Loading…
Reference in New Issue