1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2025-01-31 07:54:50 +01:00

"Free round fixes. Scottish league cup."

This commit is contained in:
gyboth 2005-06-03 20:08:19 +00:00
parent 5b44ec0333
commit 5b6ccffb1d
9 changed files with 77 additions and 16 deletions

File diff suppressed because one or more lines are too long

View File

@ -396,8 +396,8 @@ fixture_write_round_robin(gpointer league_cup, gint cup_round, GPtrArray *teams,
/* second half of fixtures */
for(i = 0; i < len - 1; i++)
{
week_round_number =
fixture_get_free_round(first_week + (len - 1 + i) * week_gap, teams, -1, -1);
week_round_number = (cup_round == -1) ?
1 : fixture_get_free_round(first_week + (len - 1 + i) * week_gap, teams, -1, -1);
for(j = 0; j < len / 2; j++)
fixture_write(fixtures, g_array_index(fixtures, Fixture, first_fixture + i * (len / 2) + j).teams[1],
@ -439,8 +439,8 @@ fixture_write_round_robin_matchday(GArray *fixtures, gint cup_round, GPtrArray *
gint i;
gint len = teams->len / 2;
gpointer home[len], away[len];
gint week_round_number =
fixture_get_free_round(week_number, teams, -1, -1);
gint week_round_number = (cup_round == -1) ?
1 : fixture_get_free_round(week_number, teams, -1, -1);
home[0] = g_ptr_array_index(teams, len * 2 - 1);
@ -582,6 +582,8 @@ fixture_get_free_round(gint week_number, const GPtrArray *teams, gint team_id1,
for(i=0;i<ligs->len;i++)
for(j=0;j<lig(i).fixtures->len;j++)
if(g_array_index(lig(i).fixtures, Fixture, j).week_number == week_number &&
(stat5 != STATUS_GENERATE_TEAMS ||
g_array_index(lig(i).fixtures, Fixture, j).attendance == -1) &&
((teams == NULL &&
(query_fixture_team_involved((&g_array_index(lig(i).fixtures, Fixture, j)), team_id1) ||
query_fixture_team_involved((&g_array_index(lig(i).fixtures, Fixture, j)), team_id2))) ||
@ -594,6 +596,8 @@ fixture_get_free_round(gint week_number, const GPtrArray *teams, gint team_id1,
for(i=0;i<acps->len;i++)
for(j=0;j<acp(i)->fixtures->len;j++)
if(g_array_index(acp(i)->fixtures, Fixture, j).week_number == week_number &&
(stat5 != STATUS_GENERATE_TEAMS ||
g_array_index(acp(i)->fixtures, Fixture, j).attendance == -1) &&
((teams == NULL &&
(query_fixture_team_involved((&g_array_index(acp(i)->fixtures, Fixture, j)), team_id1) ||
query_fixture_team_involved((&g_array_index(acp(i)->fixtures, Fixture, j)), team_id2))) ||

View File

@ -12,6 +12,7 @@
<cups>
<cup>scotland_fa</cup>
<cup>scotland_league</cup>
<cup>europe_uefa</cup>
<cup>europe_cwc</cup>
<cup>europe_champ_league</cup>

View File

@ -4,7 +4,7 @@
<short_name>FA Cup</short_name>
<symbol>flag_scotland.png</symbol>
<sid>scotland_fa</sid>
<last_week>42</last_week>
<last_week>43</last_week>
<week_gap>4</week_gap>
<property>national</property>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<cup>
<name>CIS Insurance Cup</name>
<short_name>League Cup</short_name>
<symbol>flag_scotland.png</symbol>
<sid>scotland_league</sid>
<last_week>41</last_week>
<week_gap>3</week_gap>
<property>national</property>
<cup_rounds>
<cup_round>
<home_away>0</home_away>
<replay>1</replay>
<choose_teams>
<choose_team>
<choose_team_sid>scotland1</choose_team_sid>
</choose_team>
<choose_team>
<choose_team_sid>scotland2</choose_team_sid>
</choose_team>
<choose_team>
<choose_team_sid>scotland3</choose_team_sid>
</choose_team>
<choose_team>
<choose_team_sid>scotland4</choose_team_sid>
</choose_team>
</choose_teams>
</cup_round>
<cup_round>
<home_away>0</home_away>
<replay>1</replay>
</cup_round>
<cup_round>
<home_away>0</home_away>
<replay>1</replay>
</cup_round>
<cup_round>
<home_away>0</home_away>
<replay>1</replay>
</cup_round>
<cup_round>
<home_away>0</home_away>
<neutral>1</neutral>
<replay>1</replay>
</cup_round>
<cup_round>
<home_away>0</home_away>
<neutral>1</neutral>
<replay>1</replay>
</cup_round>
</cup_rounds>
</cup>

View File

@ -31,7 +31,7 @@
<team_name>Glasgow R.</team_name>
</team>
<team>
<team_name>Dundee</team_name>
<team_name>Falkirk</team_name>
</team>
<team>
<team_name>Dundee U.</team_name>

View File

@ -35,19 +35,19 @@
<team_name>Clyde</team_name>
</team>
<team>
<team_name>Falkirk</team_name>
<team_name>Dundee</team_name>
</team>
<team>
<team_name>Hamilton</team_name>
</team>
<team>
<team_name>Partick</team_name>
<team_name>Stranraer</team_name>
</team>
<team>
<team_name>Dumfries</team_name>
</team>
<team>
<team_name>Raith</team_name>
<team_name>Brechin</team_name>
</team>
<team>
<team_name>Ross County</team_name>

View File

@ -29,16 +29,16 @@
<teams>
<team>
<team_name>Arbroath</team_name>
<team_name>Peterhead</team_name>
</team>
<team>
<team_name>Ayr</team_name>
</team>
<team>
<team_name>Berwick</team_name>
<team_name>Gretna</team_name>
</team>
<team>
<team_name>Brechin</team_name>
<team_name>Raith</team_name>
</team>
<team>
<team_name>Dumbarton</team_name>
@ -50,7 +50,7 @@
<team_name>Greenock</team_name>
</team>
<team>
<team_name>Stranraer</team_name>
<team_name>Partick</team_name>
</team>
<team>
<team_name>Stirling</team_name>

View File

@ -37,13 +37,13 @@
<team_name>Elgin</team_name>
</team>
<team>
<team_name>Gretna</team_name>
<team_name>Berwick</team_name>
</team>
<team>
<team_name>Montrose</team_name>
</team>
<team>
<team_name>Peterhead</team_name>
<team_name>Arbroath</team_name>
</team>
<team>
<team_name>Stenhousemuir</team_name>