penguins  1.0.0
autonomous.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 #include "arguments.h"
8 #include "game.h"
9 #include <stdbool.h>
10 #include <stdio.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 typedef enum AutonomousExitCode {
17  EXIT_OK = 0,
22 
23 extern const char* MY_AUTONOMOUS_PLAYER_NAME;
24 
25 int run_autonomous_mode(const Arguments* args);
26 
27 bool load_game_state(Game* game, FILE* file, int penguins_arg, const char* my_player_name);
28 bool save_game_state(const Game* game, FILE* file);
29 
30 #ifdef __cplusplus
31 }
32 #endif
The command-line argument parser.
const char * MY_AUTONOMOUS_PLAYER_NAME
Definition: autonomous.c:17
bool load_game_state(Game *game, FILE *file, int penguins_arg, const char *my_player_name)
Definition: autonomous.c:142
int run_autonomous_mode(const Arguments *args)
Definition: autonomous.c:24
bool save_game_state(const Game *game, FILE *file)
Definition: autonomous.c:292
AutonomousExitCode
Definition: autonomous.h:16
@ EXIT_INTERNAL_ERROR
Definition: autonomous.h:20
@ EXIT_INPUT_FILE_ERROR
Definition: autonomous.h:19
@ EXIT_OK
Definition: autonomous.h:17
@ EXIT_NO_POSSIBLE_MOVES
Definition: autonomous.h:18
The core of the unified game logic library, contains the Game struct.
The central struct of the application, holds the game data and settings.
Definition: game.h:237