1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2025-06-05 21:49:20 +02:00

Copa Libertadores added.

This commit is contained in:
gyboth
2005-05-29 09:01:37 +00:00
parent 1b83bebafd
commit 0699a8f404
17 changed files with 139 additions and 17 deletions

File diff suppressed because one or more lines are too long

View File

@@ -254,6 +254,13 @@ cup_load_choose_team(Cup *cup, GPtrArray *teams, const CupChooseTeam *ct)
for(j = 0; j < end; j++)
{
if(debug > 80)
printf("team %s isinint %d numteams %d\n",
team_of_id(g_array_index(league->table.elements, TableElement, order[j]).team_id)->name->str,
query_team_is_in_international_cups(
team_of_id(g_array_index(league->table.elements, TableElement, order[j]).team_id), cup->group),
number_of_teams);
if(!query_team_is_in_international_cups(
team_of_id(g_array_index(league->table.elements, TableElement, order[j]).team_id), cup->group))
{

View File

@@ -289,6 +289,7 @@ fixture_write_cup_round_robin(Cup *cup, gint cup_round, GPtrArray *teams)
gint i, j;
CupRound *cupround = &g_array_index(cup->rounds, CupRound, cup_round);
gint number_of_groups = cupround->round_robin_number_of_groups;
gint teams_per_group = -1;
GPtrArray *teams_group = NULL;
Table new_table;
TableElement new_table_element;
@@ -306,6 +307,8 @@ fixture_write_cup_round_robin(Cup *cup, gint cup_round, GPtrArray *teams)
}
}
teams_per_group = teams->len / number_of_groups;
for(i=0;i<number_of_groups;i++)
{
new_table.name = g_string_new(cup->name->str);
@@ -315,18 +318,17 @@ fixture_write_cup_round_robin(Cup *cup, gint cup_round, GPtrArray *teams)
teams_group = g_ptr_array_new();
for(j=0;j<teams->len / number_of_groups;j++)
for(j=0;j<teams_per_group;j++)
{
g_ptr_array_add(teams_group, g_ptr_array_index(teams, j + i * number_of_groups));
g_ptr_array_add(teams_group, g_ptr_array_index(teams, j + i * teams_per_group));
new_table_element =
table_element_new((Team*)g_ptr_array_index(teams, j + i * number_of_groups), j);
table_element_new((Team*)g_ptr_array_index(teams, j + i * teams_per_group), j);
g_array_append_val(new_table.elements, new_table_element);
}
g_array_append_val(cupround->tables, new_table);
fixture_write_round_robin((gpointer)cup, cup_round, teams_group, !cupround->home_away);
}
g_ptr_array_free(teams, TRUE);

View File

@@ -254,7 +254,12 @@ query_team_is_in_international_cups(const Team *tm, gint group)
if(cp(i).group == group)
for(j=0;j<cp(i).team_names->len;j++)
if(strcmp(tm->name->str, ((GString*)g_ptr_array_index(cp(i).team_names, j))->str) == 0)
{
if(debug > 90)
printf("team %s group %d found in %s \n", tm->name->str,
group, cp(i).name->str);
return TRUE;
}
return FALSE;
}

View File

@@ -14,15 +14,13 @@
</leagues>
<cups>
<!-- <cup>copadobrasil</cup> -->
<!-- <cup>libertadores</cup> -->
<!-- <cup>sulamericana</cup> -->
<cup>brazil_copa_do_brasil</cup>
<cup>brazil_prom_games2</cup>
<cup>brazil_prom_games3</cup>
<cup>brazil_prom_games4</cup>
<cup>brazil_prom_games5</cup>
<cup>brazil_prom_games6</cup>
<cup>brazil_libertadores</cup>
<cup>brazil_sul_am_br1</cup>
<cup>brazil_sul_am_br2</cup>
<cup>brazil_sul_am_br3</cup>

View File

@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<cup>
<name>Copa Libertadores</name>
<short_name>CL</short_name>
<sid>brazil_libertadores</sid>
<skill_diff>500</skill_diff>
<yellow_red>2</yellow_red>
<last_week>45</last_week>
<week_gap>3</week_gap>
<group>1505</group>
<property>international</property>
<property>highlight1</property>
<cup_rounds>
<cup_round>
<new_teams>32</new_teams>
<number_of_groups>8</number_of_groups>
<number_of_advance>2</number_of_advance>
<choose_teams>
<choose_team>
<choose_team_sid>brazil_copa_do_brasil</choose_team_sid>
<number_of_teams>1</number_of_teams>
<start_idx>1</start_idx>
<end_idx>1</end_idx>
</choose_team>
<choose_team>
<choose_team_sid>brazil1</choose_team_sid>
<number_of_teams>4</number_of_teams>
<start_idx>1</start_idx>
<end_idx>5</end_idx>
</choose_team>
<choose_team>
<choose_team_sid>argentina1_short</choose_team_sid>
<number_of_teams>5</number_of_teams>
<randomly>1</randomly>
<generate>1</generate>
</choose_team>
<choose_team>
<choose_team_sid>colombia1_short</choose_team_sid>
<number_of_teams>4</number_of_teams>
<randomly>1</randomly>
<generate>1</generate>
</choose_team>
<choose_team>
<choose_team_sid>mexico1_short</choose_team_sid>
<number_of_teams>3</number_of_teams>
<randomly>1</randomly>
<generate>1</generate>
</choose_team>
<choose_team>
<choose_team_sid>ecuador1_short</choose_team_sid>
<number_of_teams>3</number_of_teams>
<randomly>1</randomly>
<generate>1</generate>
</choose_team>
<choose_team>
<choose_team_sid>paraguay1_short</choose_team_sid>
<number_of_teams>2</number_of_teams>
<randomly>1</randomly>
<generate>1</generate>
</choose_team>
<choose_team>
<choose_team_sid>venezuela1_short</choose_team_sid>
<number_of_teams>2</number_of_teams>
<randomly>1</randomly>
<generate>1</generate>
</choose_team>
<choose_team>
<choose_team_sid>chile1_short</choose_team_sid>
<number_of_teams>2</number_of_teams>
<randomly>1</randomly>
<generate>1</generate>
</choose_team>
<choose_team>
<choose_team_sid>uruguay1_short</choose_team_sid>
<number_of_teams>2</number_of_teams>
<randomly>1</randomly>
<generate>1</generate>
</choose_team>
<choose_team>
<choose_team_sid>bolivia1_short</choose_team_sid>
<number_of_teams>2</number_of_teams>
<randomly>1</randomly>
<generate>1</generate>
</choose_team>
<choose_team>
<choose_team_sid>peru1_short</choose_team_sid>
<number_of_teams>2</number_of_teams>
<randomly>1</randomly>
<generate>1</generate>
</choose_team>
</choose_teams>
</cup_round>
<cup_round></cup_round>
<cup_round></cup_round>
<cup_round></cup_round>
<cup_round></cup_round>
</cup_rounds>
</cup>

View File

@@ -5,6 +5,7 @@
<symbol>flag_brazil.png</symbol>
<sid>brazil_prom_games2</sid>
<add_week>1000</add_week>
<group>3265</group>
<property>national</property>
<property>highlight2</property>

View File

@@ -5,6 +5,7 @@
<symbol>flag_brazil.png</symbol>
<sid>brazil_prom_games3</sid>
<add_week>1000</add_week>
<group>3265</group>
<property>national</property>
<property>highlight2</property>

View File

@@ -5,6 +5,7 @@
<symbol>flag_brazil.png</symbol>
<sid>brazil_prom_games4</sid>
<add_week>1000</add_week>
<group>3265</group>
<property>national</property>
<property>highlight2</property>

View File

@@ -5,6 +5,7 @@
<symbol>flag_brazil.png</symbol>
<sid>brazil_prom_games5</sid>
<add_week>1000</add_week>
<group>3265</group>
<property>national</property>
<property>highlight2</property>

View File

@@ -5,6 +5,7 @@
<symbol>flag_brazil.png</symbol>
<sid>brazil_prom_games6</sid>
<add_week>1000</add_week>
<group>3265</group>
<property>national</property>
<property>highlight2</property>

View File

@@ -4,7 +4,6 @@
<short_name>CSA Br 1</short_name>
<sid>brazil_sul_am_br1</sid>
<yellow_red>2</yellow_red>
<group>1005</group>
<last_week>15</last_week>
<week_gap>2</week_gap>
<property>international</property>

View File

@@ -4,10 +4,8 @@
<short_name>CSA Br 2</short_name>
<sid>brazil_sul_am_br2</sid>
<yellow_red>2</yellow_red>
<group>1005</group>
<last_week>15</last_week>
<week_gap>2</week_gap>
<group>1005</group>
<property>international</property>
<property>hide</property>
<property>highlight1</property>

View File

@@ -4,10 +4,8 @@
<short_name>CSA Br 3</short_name>
<sid>brazil_sul_am_br3</sid>
<yellow_red>2</yellow_red>
<group>1005</group>
<last_week>15</last_week>
<week_gap>2</week_gap>
<group>1005</group>
<property>international</property>
<property>hide</property>
<property>highlight1</property>

View File

@@ -4,10 +4,8 @@
<short_name>CSA Br 4</short_name>
<sid>brazil_sul_am_br4</sid>
<yellow_red>2</yellow_red>
<group>1005</group>
<last_week>15</last_week>
<week_gap>2</week_gap>
<group>1005</group>
<property>international</property>
<property>hide</property>
<property>highlight1</property>

View File

@@ -54,7 +54,7 @@
<team_name>G. de Porto Alegre</team_name>
</team>
<team>
<team_name>Gama</team_name>
<team_name>Gama 1</team_name>
</team>
<team>
<team_name>V. Nova Goiás</team_name>

View File

@@ -32,7 +32,7 @@
<team_name>Cabofriense</team_name>
</team>
<team>
<team_name>Caxias</team_name>
<team_name>Caxias 2</team_name>
</team>
<team>
<team_name>Fortaleza</team_name>