62 lines
1.5 kB
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* types.h :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: ohaponiu <marvin@42.fr> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2026/04/29 03:06:47 by ohaponiu #+# #+# */
9/* Updated: 2026/04/29 20:38:00 by ohaponiu ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#ifndef TYPES_H
14# define TYPES_H
15
16typedef struct s_stack
17{
18 int *buf;
19 int head;
20 int size;
21 int capacity;
22} t_stack;
23
24typedef enum e_strategy
25{
26 STRAT_SIMPLE,
27 STRAT_MEDIUM,
28 STRAT_COMPLEX,
29 STRAT_ADAPTIVE
30} t_strategy;
31
32typedef struct s_flags
33{
34 t_strategy strategy;
35 int bench;
36} t_flags;
37
38typedef struct s_ops
39{
40 int sa;
41 int sb;
42 int ss;
43 int pa;
44 int pb;
45 int ra;
46 int rb;
47 int rr;
48 int rra;
49 int rrb;
50 int rrr;
51} t_ops;
52
53typedef struct s_context
54{
55 t_flags flags;
56 t_stack a;
57 t_stack b;
58 t_ops ops;
59 int disorder;
60} t_context;
61
62#endif