summaryrefslogtreecommitdiff
path: root/web/web_match.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_match.c')
-rw-r--r--web/web_match.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/web_match.c b/web/web_match.c
index b3e8243..b399b85 100644
--- a/web/web_match.c
+++ b/web/web_match.c
@@ -1,5 +1,7 @@
#include "web_match.h"
+#include "match.h"
+
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
@@ -26,3 +28,8 @@ bool match_is_over()
{
return state->legs[0]->rem <= 0 || state->legs[1]->rem <= 0;
}
+
+struct leg *state_active_leg()
+{
+ return state->legs[state->active_player - 1];
+}