Cup scheduling bugfix.

This commit is contained in:
gyboth 2009-01-03 18:01:27 +00:00
parent ebf191cc2f
commit 070847ef1d
13 changed files with 1772 additions and 1190 deletions

File diff suppressed because it is too large Load Diff

2
configure vendored
View File

@ -5819,7 +5819,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ALL_LINGUAS="de nl fr pl pt ro bg zh es da sv it"
ALL_LINGUAS="de nl fr pl pt_PT pt_BR ro bg zh es da sv it"
# On IRIX 5.3, sys/types and inttypes.h are conflicting.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -56,7 +56,7 @@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
SOURCES =
POFILES = de.po nl.po fr.po pl.po pt_PT.po pt_BR.po ro.po bg.po zh.po es.po da.po sv.po it.po
GMOFILES = de.gmo nl.gmo fr.gmo pl.gmo pt_PT.gmo pt_BR.gmo ro.gmo bg.gmo zh.gmo es.gmo da.gmo sv.gmo it.gmo
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
DISTFILES = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
$(POFILES) $(GMOFILES) $(SOURCES)
POTFILES = \

View File

@ -56,7 +56,7 @@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
SOURCES =
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
DISTFILES = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
$(POFILES) $(GMOFILES) $(SOURCES)
POTFILES = \

View File

@ -266,13 +266,15 @@ cup_get_team_pointers(Cup *cup, gint round, gboolean preload)
printf("cup_get_team_pointers\n");
#endif
gint i;
gint i, existing_teams;
CupRound *cup_round = &g_array_index(cup->rounds, CupRound, round);
GPtrArray *teams = cup_round->team_ptrs;
if(debug > 60)
g_print("cup_get_team_pointers %s round %d\n", cup->name, round);
existing_teams = cup_round->teams->len;
for(i=0;i<cup_round->choose_teams->len;i++)
if(g_array_index(cup_round->choose_teams, CupChooseTeam, i).preload == preload)
{
@ -284,16 +286,16 @@ cup_get_team_pointers(Cup *cup, gint round, gboolean preload)
cup_load_choose_team(
cup, teams,
&g_array_index(cup_round->choose_teams, CupChooseTeam, i));
}
}
if(cup_round->teams->len > 0)
while(teams->len + cup_round->teams->len > cup_round->new_teams)
if(cup_round->teams->len - existing_teams > 0)
while(teams->len + cup_round->teams->len - existing_teams > cup_round->new_teams)
{
free_team(&g_array_index(cup_round->teams, Team, cup_round->teams->len - 1));
g_array_remove_index(cup_round->teams, cup_round->teams->len - 1);
}
for(i=0;i<cup_round->teams->len;i++)
for(i=existing_teams;i<cup_round->teams->len;i++)
{
team_generate_players_stadium(&g_array_index(cup_round->teams, Team, i), 0);
g_ptr_array_add(cup->teams, &g_array_index(cup_round->teams, Team, i));
@ -302,10 +304,10 @@ cup_get_team_pointers(Cup *cup, gint round, gboolean preload)
if(debug > 70)
for(i=0;i<teams->len;i++)
g_print("cup_get_team_pointers: %d %s (%d) %s\n", i,
((Team*)g_ptr_array_index(teams, i))->name,
((Team*)g_ptr_array_index(teams, i))->clid,
cup->name);
g_print("cup_get_team_pointers: %s round %d team %d %s (clid %d)\n",
cup->name, round, i,
((Team*)g_ptr_array_index(teams, i))->name,
((Team*)g_ptr_array_index(teams, i))->clid);
}
/** Get the pointers to the teams (already generated, in one of the leagues or cups)

View File

@ -684,7 +684,7 @@ fixture_write_knockout_round(Cup *cup, gint cup_round, GPtrArray *teams)
teams = misc_randomise_g_pointer_array(teams);
/* Special rule for cups that have to wait for other cups. */
if(first_week < week + 1)
if(first_week < week)
first_week = week + 1;
week_number = league_cup_get_week_with_break(cup->id, first_week);

View File

@ -14,10 +14,10 @@
<cups>
<cup>albania_cup</cup>
<cup>europe_uefa</cup>
<cup>europe_champ_league</cup>
<cup>supercup_europe_uefa</cup>
<cup>supercup_europe_intercontinental</cup>
<cup>europe_champ_league1a</cup>
<cup>europe_uefa_new</cup>
<!-- <cup>supercup_europe_uefa_new</cup> -->
<!-- <cup>supercup_europe_intercontinental</cup> -->
<cup>albania_supercup</cup>
<cup>albania_prom_games1</cup>
</cups>

View File

@ -451,7 +451,7 @@
<subtitle condition="_GDAGG_ = 0 and _CUPET_ = 0 and _CUPPEN_ = 0">Die beiden Teams schenkten sich nichts in diesen Begegnungen, doch _CUPMATCHWINNER_ hat das bessere Ende für sich.</subtitle>
<subtitle condition="_GDAGG_ = 0 and _CUPET_ = 0 and _CUPPEN_ = 0">_CUPMATCHLOSER_ fehlt ein einziges Tor, um weiterzukommen.</subtitle>
<subtitle condition="_GDAGG_ = 1">Diese Paarung hatte es in sich, doch nach dem _RE_ muss sich _CUPMATCHLOSER_ mit dem Ausscheiden abfinden.</subtitle>
<subtitle condition="_GDAGG_ = 1">_CUPMATCHWINNER_ hält durch gegen _CUPMATCHLOSER_ und kommt denkbar knapp in dei nächste Runde.</subtitle>
<subtitle condition="_GDAGG_ = 1">_CUPMATCHWINNER_ hält durch gegen _CUPMATCHLOSER_ und kommt denkbar knapp in die nächste Runde.</subtitle>
<subtitle condition="_CUPET_ = 0 and _CUPPEN_ = 0 and _GDAGG_ < 2">_CUPMATCHWINNER_ kann sich bei _SCORERS_CUPMATCHWINNERN__ fürs Weiterkommen bedanken.</subtitle>
<subtitle condition="_MULTIPLESCORERS_CUPMATCHWINNERN__ = 1 and _CUPET_ = 0 and _CUPPEN_ = 0 and _GDAGG_ < 2">_SCORERS_CUPMATCHWINNERN__ treffen beim knappen Sieg für _CUPMATCHWINNER_.</subtitle>
<subtitle condition="_GDAGG_ > 2">_CUPMATCHWINNER_ war letztlich ungefährdet in diesen Begegnungen und kommt verdient eine Runde weiter.</subtitle>
@ -460,5 +460,43 @@
<subtitle condition="_GDAGG_ > 2">_CUPMATCHWINNER_ dominierte die beiden Begegnungen und kann weiter auf den Titel hoffen.</subtitle>
</news_article>
<news_article>
<type>match</type>
<priority>25</priority>
<condition>_CUP_ = 1 and _CUPKO_ = 1 and _CUPPROMREL_ = 0 and _CUPAUX_ = 0 and _CUPSTAGE_ > 3 and _CUPHOMEAWAY_ = 0</condition>
<title>_CUPMATCHWINNER_ ist in der nächsten Runde</title>
<title>_CUPMATCHWINNER_ [ist|kommt] weiter</title>
<title>_CUPMATCHLOSER_ scheidet aus</title>
<title>_CUPMATCHLOSER_ draussen</title>
<title priority="20" condition="_CUPET_ = 1">_CUPMATCHWINNER_ [besiegt|schlägt|bezwingt|gewinnt gegen] _CUPMATCHLOSER_ nach Verlängerung</title>
<title priority="20" condition="_CUPET_ = 1">_CUPMATCHWINNER_ hat nach Verlängerung das besser Ende für sich</title>
<title priority="20" condition="_CUPPEN_ = 1">_CUPMATCHWINNER_ [besiegt|schlägt|bezwingt|gewinnt gegen] _CUPMATCHLOSER_ _REW_ nach Elfmeterschießen</title>
<title priority="20" condition="_CUPPEN_ = 1">_CUPMATCHWINNER_ behält die Nerven im Elfmeterschießen gegen _CUPMATCHLOSER_</title>
<title condition="_GD_ = 0">Unentschieden reicht _CUPMATCHWINNER_</title>
<title condition="_GD_ = 0">_CUPMATCHWINNER_ kommt mit Unentschieden weiter</title>
<title condition="_GD_ = 0">_CUPMATCHLOSER_ scheidet nach _RE_ aus</title>
<title condition="_GDAGG_ = 1">_CUPMATCHWINNER_ mit einem Tor Vorsprung weiter</title>
<title condition="_GDAGG_ = 1">_CUPMATCHLOSER_ scheidet knapp aus</title>
<title condition="_GDAGG_ = 1">_CUPMATCHLOSER_ nach knappem Gesamtergebnis draussen</title>
<title condition="_GDAGG_ > 1">_CUPMATCHWINNER_ locker weiter</title>
<title condition="_GDAGG_ > 1">_CUPMATCHWINNER_ ohne Probleme weiter</title>
<title condition="_GDAGG_ > 1">_CUPMATCHWINNER_ kommt locker in die nächste Runde</title>
<subtitle condition="_MULTIPLESCORERS_CUPMATCHWINNERN__ = 1 and _CUPET_ = 0 and _CUPPEN_ = 0">_SCORERS_CUPMATCHWINNERN__ machen die Sache klar für _CUPMATCHWINNER_.</subtitle>
<subtitle condition="_MULTIPLESCORERS_CUPMATCHWINNERN__ = 1 and _CUPET_ = 0 and _CUPPEN_ = 0">_CUPMATCHWINNER_ kommt dank der Tore von _SCORERS_CUPMATCHWINNERN__ weiter.</subtitle>
<subtitle condition="_MULTIPLESCORERS_CUPMATCHWINNERN__ = 0 and _CUPET_ = 0 and _CUPPEN_ = 0">_SCORERS_CUPMATCHWINNERN__ schießt _CUPMATCHWINNER_ eine Runde weiter.</subtitle>
<subtitle condition="_MULTIPLESCORERS_CUPMATCHWINNERN__ = 0 and _CUPET_ = 0 and _CUPPEN_ = 0">_CUPMATCHWINNER_ kommt dank _SCORERS_CUPMATCHWINNERN__ weiter.</subtitle>
<subtitle condition="_GDAGG_ = 1 and _CUPET_ = 0 and _CUPPEN_ = 0">_AT_ Zuschauer halten den Atem an beim spannenden _RE_ im Rückspiel.</subtitle>
<subtitle condition="_GDAGG_ = 1 and _CUPET_ = 0 and _CUPPEN_ = 0">Die beiden Teams schenkten sich nichts in dieser Partie, doch _CUPMATCHWINNER_ hat das bessere Ende für sich.</subtitle>
<subtitle condition="_GDAGG_ = 1 and _CUPET_ = 0 and _CUPPEN_ = 0">_CUPMATCHLOSER_ fehlt ein einziges Tor, um weiterzukommen.</subtitle>
<subtitle condition="_GDAGG_ = 1">Diese Paarung hatte es in sich, doch nach dem _RE_ muss sich _CUPMATCHLOSER_ mit dem Ausscheiden abfinden.</subtitle>
<subtitle condition="_GDAGG_ = 1">_CUPMATCHWINNER_ hält durch gegen _CUPMATCHLOSER_ und kommt denkbar knapp in die nächste Runde.</subtitle>
<subtitle condition="_CUPET_ = 0 and _CUPPEN_ = 0 and _GDAGG_ < 2">_CUPMATCHWINNER_ kann sich bei _SCORERS_CUPMATCHWINNERN__ fürs Weiterkommen bedanken.</subtitle>
<subtitle condition="_MULTIPLESCORERS_CUPMATCHWINNERN__ = 1 and _CUPET_ = 0 and _CUPPEN_ = 0 and _GDAGG_ < 2">_SCORERS_CUPMATCHWINNERN__ treffen beim knappen Sieg für _CUPMATCHWINNER_.</subtitle>
<subtitle condition="_GDAGG_ > 2">_CUPMATCHWINNER_ war letztlich ungefährdet in dieser Begegnung und kommt verdient eine Runde weiter.</subtitle>
<subtitle condition="_GDAGG_ > 2">_CUPMATCHLOSER_ ist bei dieser Paarung chancenlos und fliegt raus.</subtitle>
<subtitle condition="_GDAGG_ > 2">_CUPMATCHLOSER_ hätte das Weiterkommen nicht verdient nach dem _RE_.</subtitle>
<subtitle condition="_GDAGG_ > 2">_CUPMATCHWINNER_ dominierte die Begegnung und kann weiter auf den Titel hoffen.</subtitle>
</news_article>
</news>