penguins  1.0.0
arguments.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 #include "bot.h"
7 #include <stdbool.h>
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 typedef enum ActionArg {
22 } ActionArg;
23 
24 typedef enum GenerateArg {
28 } GenerateArg;
29 
30 typedef struct Arguments {
32  int penguins;
33  const char* input_board_file;
34  const char* output_board_file;
35  const char* set_name;
40 } Arguments;
41 
42 void init_arguments(Arguments* self);
43 void print_usage(const char* prog_name);
44 bool parse_arguments(Arguments* result, int argc, char* argv[]);
45 
46 #ifdef __cplusplus
47 }
48 #endif
ActionArg
Definition: arguments.h:13
@ ACTION_ARG_PRINT_NAME
Definition: arguments.h:17
@ ACTION_ARG_GENERATE
Definition: arguments.h:20
@ ACTION_ARG_PRINT_VERSION
Definition: arguments.h:15
@ ACTION_ARG_MOVEMENT
Definition: arguments.h:19
@ ACTION_ARG_PLACEMENT
Definition: arguments.h:18
@ ACTION_ARG_VIEW
Definition: arguments.h:21
@ ACTION_ARG_PRINT_HELP
Definition: arguments.h:14
@ ACTION_ARG_INTERACTIVE
Definition: arguments.h:16
bool parse_arguments(Arguments *result, int argc, char *argv[])
Definition: arguments.c:36
void print_usage(const char *prog_name)
Definition: arguments.c:20
GenerateArg
Definition: arguments.h:24
@ GENERATE_ARG_ISLAND
Definition: arguments.h:26
@ GENERATE_ARG_NONE
Definition: arguments.h:25
@ GENERATE_ARG_RANDOM
Definition: arguments.h:27
void init_arguments(Arguments *self)
Definition: arguments.c:8
The bot algorithm.
const char * set_name
Definition: arguments.h:35
ActionArg action
Definition: arguments.h:31
int board_gen_height
Definition: arguments.h:38
const char * input_board_file
Definition: arguments.h:33
const char * output_board_file
Definition: arguments.h:34
GenerateArg board_gen_type
Definition: arguments.h:39
BotParameters bot
Definition: arguments.h:36
int penguins
Definition: arguments.h:32
int board_gen_width
Definition: arguments.h:37
Various parameters for the bot algorithm.
Definition: bot.h:44