diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-01 15:07:11 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-01 15:07:11 -0700 |
commit | 22646d963e2b0c9b5ef629aa7704158026cfa6d1 (patch) | |
tree | 173473a78da784cf9a5e96770c5a87df5c575a8e /web/web_match.h | |
parent | 9459b7fb563caae520bdf8d11da9b070ebff45e9 (diff) | |
download | dartboat-22646d963e2b0c9b5ef629aa7704158026cfa6d1.tar.gz dartboat-22646d963e2b0c9b5ef629aa7704158026cfa6d1.tar.xz |
web: split code into more files
This is currently very messy with all the files interdependent on one
another and a lot of the logic still in the main file. It will take some
time to refactor and clean up.
Diffstat (limited to 'web/web_match.h')
-rw-r--r-- | web/web_match.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/web/web_match.h b/web/web_match.h new file mode 100644 index 0000000..4b4c7bb --- /dev/null +++ b/web/web_match.h @@ -0,0 +1,29 @@ +#ifndef WEB_MATCH_H +#define WEB_MATCH_H + +#include "match.h" + +enum match_mode { + M_FIRST = 1, + M_PVC = M_FIRST, + M_P, + M_PVP, + M_LAST = M_PVP +}; + +struct match_state { + enum match_mode mode; + struct leg *legs[2]; + struct leg *active_leg; + int active_player; + int boat_undone; + int num_darts; +}; + +extern struct match_state *state; + +void free_state(); + +bool is_match_over(); + +#endif |