]> git.sesse.net Git - ccbs/blobdiff - bigscreen/ccbs_bigscreen.cpp
Hit the group-fetching code so it compiles.
[ccbs] / bigscreen / ccbs_bigscreen.cpp
index 9db87c8f9be0f9024c344ef2ea502a2b1ca2adab..f50991212b4257bc323c01b3413b81f98ea2992f 100644 (file)
@@ -8,10 +8,11 @@
 #include "widestring.h"
 #include "fetch_current_tournament.h"
 #include "fetch_list_of_active_groups.h"
+#include "fetch_group.h"
 #include "fonts.h"
 
 Tournament active_tournament;
-std::vector<Group> active_groups;
+std::vector<SkeletonGroup> active_groups;
 unsigned char framebuf[800 * 600 * 4];
 
 void init(pqxx::connection &conn)
@@ -24,9 +25,13 @@ void init(pqxx::connection &conn)
        } else {
                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) {
+               for (std::vector<SkeletonGroup>::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);
+
+                       Group gr;
+                       conn.perform(FetchGroup(i->tournament, i->round, i->parallel, &gr));
+                       std::fprintf(stderr, "%u players in group\n", gr.players.size());
                }
        }
 }