Freeciv-3.2
|
Go to the source code of this file.
Data Structures | |
struct | caravan_result |
struct | caravan_parameter |
Macros | |
#define | caravan_parameter_log(parameter, loglevel) |
Enumerations | |
enum | foreign_trade_limit { FTL_NATIONAL_ONLY , FTL_ALLIED , FTL_PEACEFUL , FTL_NONWAR } |
#define caravan_parameter_log | ( | parameter, | |
loglevel | |||
) |
void caravan_find_best_destination | ( | const struct civ_map * | nmap, |
const struct unit * | caravan, | ||
const struct caravan_parameter * | parameter, | ||
struct caravan_result * | result, | ||
bool | omniscient | ||
) |
Find the best destination city for the caravan. Store it in *destout (if destout is non-null); return the value of the trade route.
Definition at line 752 of file caravan.c.
Referenced by dai_manage_caravan().
void caravan_optimize_allpairs | ( | const struct unit * | caravan, |
const struct caravan_parameter * | param, | ||
struct caravan_result * | result, | ||
bool | omniscient | ||
) |
void caravan_parameter_init_default | ( | struct caravan_parameter * | parameter | ) |
Create a valid parameter with default values.
Definition at line 36 of file caravan.c.
Referenced by caravan_parameter_init_from_unit().
void caravan_parameter_init_from_unit | ( | struct caravan_parameter * | parameter, |
const struct unit * | caravan | ||
) |
Create a valid parameter with default values based on the caravan.
Definition at line 53 of file caravan.c.
Referenced by dai_manage_caravan().
bool caravan_parameter_is_legal | ( | const struct caravan_parameter * | parameter | ) |
int caravan_result_compare | ( | const struct caravan_result * | a, |
const struct caravan_result * | b | ||
) |
Compare the two results for sorting.
Definition at line 183 of file caravan.c.
Referenced by caravan_find_best_destination_notransit(), caravan_optimize_notransit(), cfbdw_callback(), and cowt_callback().
void caravan_result_init_zero | ( | struct caravan_result * | result | ) |
Initialize the result to be worth zero and go from nowhere to nowhere.
Definition at line 144 of file caravan.c.
Referenced by caravan_optimize_withtransit(), and get_discounted_reward().