]> git.sesse.net Git - pkanalytics/blobdiff - events.h
Make it possible to seek to an event by clicking on it.
[pkanalytics] / events.h
index 9dba9cfbf573422e65aed247c4246f56057ee308..56fcbaff53a07ec93278b9af3a9d4bcc94794229 100644 (file)
--- a/events.h
+++ b/events.h
@@ -28,6 +28,15 @@ public:
        unsigned insert_event(uint64_t t, int player_id);  // Returns the row.
        void delete_event(unsigned row);
        void set_event_type(unsigned row, const std::string &type);
+       uint64_t get_time(unsigned row) { return events[row].t; }
+
+       struct Status {
+               unsigned our_score, their_score;
+               bool offense;
+               unsigned num_passes;
+               unsigned possession_sec;
+       };
+       Status get_status_at(uint64_t t);
 
 private:
        struct Player {