69#define allowed_nations_iterate(pnation) \
70 nations_iterate(pnation) { \
71 if (nation_is_in_current_set(pnation)) {
73#define allowed_nations_iterate_end \
98#define shuffled_players_iterate(NAME_pplayer) \
101 struct player *NAME_pplayer; \
102 log_debug("shuffled_players_iterate @ %s line %d", \
103 __FILE__, __FC_LINE__); \
104 for (MY_i = 0; MY_i < player_slot_count(); MY_i++) { \
105 NAME_pplayer = shuffled_player(MY_i); \
106 if (NAME_pplayer != nullptr) {
108#define shuffled_players_iterate_end \
113#define phase_players_iterate(pplayer) \
115 shuffled_players_iterate(pplayer) { \
116 if (is_player_phase(pplayer, game.info.phase)) {
118#define phase_players_iterate_end \
120 } shuffled_players_iterate_end; \
123#define alive_phase_players_iterate(pplayer) \
125 phase_players_iterate(pplayer) { \
126 if (pplayer->is_alive) {
128#define alive_phase_players_iterate_end \
130 } phase_players_iterate_end \
140 const struct unit_list
142 const struct unit_list
170 enum ai_level skill_level);
void send_nation_availability(struct conn_list *dest, bool nationset_change)
void server_player_set_name(struct player *pplayer, const char *name)
int barbarian_count(void)
void send_player_all_c(struct player *src, struct conn_list *dest)
struct player * server_create_player(int player_id, const char *ai_tname, struct rgbcolor *prgbcolor, bool allow_ai_type_fallbacking)
bool client_can_pick_nation(const struct nation_type *nation)
const struct rgbcolor * player_preferred_color(struct player *pplayer)
void player_update_last_war_action(struct player *pplayer)
int normal_player_count(void)
void player_set_under_human_control(struct player *pplayer)
void playercolor_free(void)
bool player_status_check(struct player *plr, enum player_status status)
void give_midgame_initial_units(struct player *pplayer, struct tile *ptile)
void player_limit_to_max_rates(struct player *pplayer)
bool civil_war_triggered(struct player *pplayer)
void server_player_set_color(struct player *pplayer, const struct rgbcolor *prgbcolor)
void player_set_to_ai_mode(struct player *pplayer, enum ai_level skill_level)
bool server_player_set_name_full(const struct connection *caller, struct player *pplayer, const struct nation_type *pnation, const char *name, char *error_buf, size_t error_buf_len)
bool player_delegation_active(const struct player *pplayer)
void player_info_thaw(void)
void player_info_freeze(void)
struct player * player_by_user_delegated(const char *name)
void maybe_make_contact(struct tile *ptile, struct player *pplayer)
struct nation_type * pick_a_nation(const struct nation_list *choices, bool ignore_conflicts, bool needs_startpos, enum barbarian_type barb_type)
void playercolor_init(void)
void check_player_max_rates(struct player *pplayer)
void kill_player(struct player *pplayer)
const char * player_color_ftstr(struct player *pplayer)
void send_player_info_c(struct player *src, struct conn_list *dest)
void set_shuffled_players(int *shuffled_players)
struct player * civil_war(struct player *pplayer)
void player_status_reset(struct player *plr)
void send_delegation_info(const struct connection *pconn)
void update_national_activities(struct player *pplayer, int old_gold)
struct conn_list * player_reply_dest(struct player *pplayer)
void update_players_after_alliance_breakup(struct player *pplayer, struct player *pplayer2, const struct unit_list *pplayer_seen_units, const struct unit_list *pplayer2_seen_units)
bool civil_war_possible(struct player *pplayer, bool conquering_city, bool honour_server_option)
struct rgbcolor * playercolor_get(int id)
void player_delegation_set(struct player *pplayer, const char *username)
int playercolor_count(void)
void shuffle_players(void)
void server_remove_player(struct player *pplayer)
void government_change(struct player *pplayer, struct government *gov, bool revolution_finished)
void server_player_init(struct player *pplayer, bool initmap, bool needs_team)
void make_contact(struct player *pplayer1, struct player *pplayer2, struct tile *ptile)
void player_status_add(struct player *plr, enum player_status status)
void playercolor_add(struct rgbcolor *prgbcolor)
void update_capital(struct player *pplayer)
void count_playable_nations(void)
bool player_color_changeable(const struct player *pplayer, const char **reason)
void assign_player_colors(void)
void send_player_diplstate_c(struct player *src, struct conn_list *dest)
struct player * shuffled_player(int i)
void player_loot_player(struct player *pvictor, struct player *pvictim)
const char * player_delegation_get(const struct player *pplayer)
bool nation_is_in_current_set(const struct nation_type *pnation)
void enter_war(struct player *pplayer, struct player *pplayer2)
int revolution_length(struct government *gov, struct player *plr)
void fit_nationset_to_players(void)
void reset_all_start_commands(bool plrchange)
void update_revolution(struct player *pplayer)
enum barbarian_type barb_type
char username[MAX_LEN_NAME]