Freeciv-3.2: /fast/freeciv/nightly/S3_2/common/aicore/aisupport.h File Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Functions
aisupport.h File Reference
`#include "fc_types.h"`

Go to the source code of this file.

## Functions

struct player * | player_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().