Freeciv21
Develop your civilization from humble roots to a global empire
aisupport.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct playerplayer_leading_spacerace ()
 Find who is leading the space race. More...
 
int player_distance_to_player (struct player *pplayer, struct player *target)
 Calculate average distances to other players. More...
 
int city_gold_worth (struct city *pcity)
 Rough calculation of the worth of pcity in gold. More...
 

Function Documentation

◆ city_gold_worth()

int city_gold_worth ( struct city pcity)

Rough calculation of the worth of pcity in gold.

Definition at line 104 of file aisupport.cpp.

Referenced by dai_goldequiv_clause().

◆ player_distance_to_player()

int player_distance_to_player ( struct player pplayer,
struct player target 
)

Calculate average distances to other players.

We calculate the average distance from all of our cities to the closest enemy city.

Definition at line 68 of file aisupport.cpp.

Referenced by dai_war_desire().

◆ player_leading_spacerace()

struct player* player_leading_spacerace ( )

Find who is leading the space race.

Returns nullptr if nobody is.

Definition at line 31 of file aisupport.cpp.

Referenced by adv_data_phase_init().