From 85c101979a181a76e6250fb1abb75216e08384a3 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 23 May 2022 23:15:34 -0700 Subject: move more match logic from web to lib --- match.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'match.h') diff --git a/match.h b/match.h index b22ed63..32523b6 100644 --- a/match.h +++ b/match.h @@ -37,10 +37,12 @@ struct match { struct leg **legs; }; -struct leg *leg_init(int points); +struct leg *leg_init(int pts); void leg_free(struct leg *l); void leg_grow_visits(struct leg *l); +struct visit *leg_comp_visit(struct leg *l, bool redo_undone); +struct visit *leg_pts_visit(struct leg *l, int pts); void leg_undo_visit(struct leg *l); void leg_redo_visit(struct leg *l); @@ -53,6 +55,7 @@ int match_next_player(struct match *m); int match_prev_player(struct match *m); int match_prev_throw_player(struct match *m); int match_winning_player(struct match *m); +bool match_first_user_has_thrown(struct match *m); bool is_points_valid(int pts, int rem); -- cgit v1.2.3-70-g09d2