Removed silencing of gtk warning logs from gtk3.22-client.
[freeciv.git] / ai / stub / stubai.c
blobecec264a654ad4bdcb535db1841e4b9c07928a3c
1 /***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
14 #ifdef HAVE_CONFIG_H
15 #include <fc_config.h>
16 #endif
18 /* common */
19 #include "ai.h"
20 #include "player.h"
22 const char *fc_ai_stub_capstr(void);
23 bool fc_ai_stub_setup(struct ai_type *ai);
25 /**************************************************************************
26 Return module capability string
27 **************************************************************************/
28 const char *fc_ai_stub_capstr(void)
30 return FC_AI_MOD_CAPSTR;
33 /**************************************************************************
34 Set phase done
35 **************************************************************************/
36 static void stub_end_turn(struct player *pplayer)
38 pplayer->ai_phase_done = TRUE;
41 /**************************************************************************
42 Setup player ai_funcs function pointers.
43 **************************************************************************/
44 bool fc_ai_stub_setup(struct ai_type *ai)
46 strncpy(ai->name, "stub", sizeof(ai->name));
48 ai->funcs.first_activities = stub_end_turn;
49 ai->funcs.restart_phase = stub_end_turn;
51 return TRUE;