Freeciv-3.2
Loading...
Searching...
No Matches
Functions
aisupport.c File Reference
#include "log.h"
#include "shared.h"
#include "support.h"
#include "city.h"
#include "game.h"
#include "map.h"
#include "player.h"
#include "spaceship.h"
#include "tech.h"
#include "unitlist.h"
#include "victory.h"
#include "aisupport.h"

Go to the source code of this file.

Functions

struct playerplayer_leading_spacerace (void)
 
int player_distance_to_player (struct player *pplayer, struct player *target)
 
int city_gold_worth (struct city *pcity)
 

Function Documentation

◆ city_gold_worth()

int city_gold_worth ( struct city pcity)

Rough calculation of the worth of pcity in gold.

Definition at line 108 of file aisupport.c.

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 75 of file aisupport.c.

Referenced by dai_war_desire().

◆ player_leading_spacerace()

struct player * player_leading_spacerace ( void  )

Find who is leading the space race. Returns NULL if nobody is.

Definition at line 38 of file aisupport.c.

Referenced by adv_data_phase_init().