Freeciv21
Develop your civilization from humble roots to a global empire
stubai.c
Go to the documentation of this file.
1 /*__ ___ ***************************************
2 / \ / \ Copyright (c) 1996-2020 Freeciv21 and Freeciv
3 \_ \ / __/ contributors. This file is part of Freeciv21.
4  _\ \ / /__ Freeciv21 is free software: you can redistribute it
5  \___ \____/ __/ and/or modify it under the terms of the GNU General
6  \_ _/ Public License as published by the Free Software
7  | @ @ \_ Foundation, either version 3 of the License,
8  | or (at your option) any later version.
9  _/ /\ You should have received a copy of the GNU
10  /o) (o/\ \_ General Public License along with Freeciv21.
11  \_____/ / If not, see https://www.gnu.org/licenses/.
12  \____/ ********************************************************/
13 
14 #include <fc_config.h>
15 
16 /* common */
17 #include "ai.h"
18 #include "player.h"
19 
20 const char *fc_ai_stub_capstr(void);
21 bool fc_ai_stub_setup(struct ai_type *ai);
22 
23 /**********************************************************************/
26 const char *fc_ai_stub_capstr(void) { return FC_AI_MOD_CAPSTR; }
27 
28 /**********************************************************************/
31 static void stub_end_turn(struct player *pplayer)
32 {
33  pplayer->ai_phase_done = true;
34 }
35 
36 /**********************************************************************/
39 bool fc_ai_stub_setup(struct ai_type *ai)
40 {
41  qstrncpy(ai->name, "stub", sizeof(ai->name));
42 
45 
46  return true;
47 }
#define FC_AI_MOD_CAPSTR
Definition: ai.h:22
Definition: ai.h:42
void(* restart_phase)(struct player *pplayer)
Definition: ai.h:254
struct ai_type::@12 funcs
char name[MAX_LEN_NAME]
Definition: ai.h:43
void(* first_activities)(struct player *pplayer)
Definition: ai.h:250
Definition: player.h:231
bool ai_phase_done
Definition: player.h:246
bool fc_ai_stub_setup(struct ai_type *ai)
Setup player ai_funcs function pointers.
Definition: stubai.c:39
const char * fc_ai_stub_capstr(void)
Return module capability string.
Definition: stubai.c:26
static void stub_end_turn(struct player *pplayer)
Set phase done.
Definition: stubai.c:31