#include "flagtrigger.h"
#include "widestring.h"
#include "fetch_current_tournament.h"
+#include "fetch_list_of_active_groups.h"
#include "fonts.h"
Tournament active_tournament;
+std::vector<Group> active_groups;
unsigned char framebuf[800 * 600 * 4];
void init(pqxx::connection &conn)
{
conn.perform(FetchCurrentTournament(&active_tournament));
+ conn.perform(FetchListOfActiveGroups(&active_groups));
if (active_tournament.id == -1) {
std::fprintf(stderr, "No active tournament\n");
} else {
- std::fprintf(stderr, "Current tournament is %d (name: '%s')\n",
- active_tournament.id, active_tournament.name.c_str());
+ std::fprintf(stderr, "Current tournament is %d\n", active_tournament.id);
+
+ for (std::vector<Group>::const_iterator i = active_groups.begin(); i != active_groups.end(); ++i) {
+ std::fprintf(stderr, "tourn: %u round: %u parallel: %u\n",
+ i->tournament, i->round, i->parallel);
+ }
}
}