Freeciv21
Develop your civilization from humble roots to a global empire
handicaps.h
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 #pragma once
14 
15 // See handicap_desc() for what these do.
35  H_LAST
36 };
37 class QBitArray;
38 
39 void handicaps_init(struct player *pplayer);
40 void handicaps_close(struct player *pplayer);
41 
42 void handicaps_set(struct player *pplayer, QBitArray *handicaps);
43 bool has_handicap(const struct player *pplayer, enum handicap_type htype);
44 
45 const char *handicap_desc(enum handicap_type htype, bool *inverted);
bool has_handicap(const struct player *pplayer, enum handicap_type htype)
AI players may have handicaps - allowing them to cheat or preventing them from using certain algorith...
Definition: handicaps.cpp:62
void handicaps_set(struct player *pplayer, QBitArray *handicaps)
Set player handicaps.
Definition: handicaps.cpp:50
const char * handicap_desc(enum handicap_type htype, bool *inverted)
Return a short (translated) string describing the handicap, for help.
Definition: handicaps.cpp:76
handicap_type
Definition: handicaps.h:16
@ H_LAST
Definition: handicaps.h:35
@ H_MAP
Definition: handicaps.h:27
@ H_REVOLUTION
Definition: handicaps.h:29
@ H_DIPLOMACY
Definition: handicaps.h:28
@ H_DIPLOMAT
Definition: handicaps.h:17
@ H_TARGETS
Definition: handicaps.h:23
@ H_LIMITEDHUTS
Definition: handicaps.h:19
@ H_RATES
Definition: handicaps.h:22
@ H_AWAY
Definition: handicaps.h:18
@ H_HUTS
Definition: handicaps.h:24
@ H_EXPERIMENTAL
Definition: handicaps.h:21
@ H_DEFENSIVE
Definition: handicaps.h:20
@ H_DANGER
Definition: handicaps.h:31
@ H_NOBRIBE_WF
Definition: handicaps.h:33
@ H_NOPLANES
Definition: handicaps.h:26
@ H_FOG
Definition: handicaps.h:25
@ H_PRODCHGPEN
Definition: handicaps.h:34
@ H_EXPANSION
Definition: handicaps.h:30
@ H_CEASEFIRE
Definition: handicaps.h:32
void handicaps_init(struct player *pplayer)
Initialize handicaps for player.
Definition: handicaps.cpp:26
void handicaps_close(struct player *pplayer)
Free resources associated with player handicaps.
Definition: handicaps.cpp:37
Definition: player.h:231