From cbbb37271bdfd5b51824f8b5a3ee5354236beff0 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Wed, 18 May 2022 15:45:21 -0700 Subject: web: remove active leg ptr; various cleanup --- web/web_match.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'web/web_match.c') 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 #include #include @@ -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]; +} -- cgit v1.2.3-70-g09d2