diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-18 15:45:21 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-18 15:45:21 -0700 |
commit | cbbb37271bdfd5b51824f8b5a3ee5354236beff0 (patch) | |
tree | b5514e2a9d104d36b4877c691a1d44e8ee762926 /web/web_match.c | |
parent | 46d5c38b80b2e5f6b237ea0313ba23c408bdf7fe (diff) | |
download | dartboat-cbbb37271bdfd5b51824f8b5a3ee5354236beff0.tar.gz dartboat-cbbb37271bdfd5b51824f8b5a3ee5354236beff0.tar.xz |
web: remove active leg ptr; various cleanup
Diffstat (limited to 'web/web_match.c')
-rw-r--r-- | web/web_match.c | 7 |
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]; +} |