summaryrefslogtreecommitdiff
path: root/match.h
blob: ce527170e219b1a50f18b55d36c3b172a7531296 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef MATCH_H
#define MATCH_H

#include "board.h"

struct visit {
	int points;
	int rem;
	int n_darts;
	struct segment *darts;
	struct ccoords *ccoords;
};

struct leg {
	char *name;
	int start;
	int rem;
	int n_visits, size_visits;
	struct visit *visits;
};

struct leg *leg_init(int points, char *name);
void leg_free(struct leg *l);
void leg_grow_visits(struct leg *l);

bool is_points_valid(int pts, int rem);

#endif