1 #include "groupscreen.h"
2 #include "fetch_group.h"
4 GroupScreen::GroupScreen(pqxx::connection &conn, unsigned tournament, unsigned round, unsigned parallel)
5 : tournament(tournament), round(tournament), parallel(parallel), scores_changed(conn, "scores"), conn(conn), valid(false)
9 GroupScreen::~GroupScreen()
13 bool GroupScreen::check_invalidated()
15 // we might want to do this slightly more sophisticated later, but for now this will do
16 return !valid || scores_changed.get_flag();
19 void GroupScreen::draw(unsigned char *buf)
21 scores_changed.reset_flag();
24 conn.perform(FetchGroup(tournament, round, parallel, &group));