Freeciv-3.1
|
#include "diptreaty.h"
#include "game.h"
#include "map.h"
#include "metaknowledge.h"
#include "tile.h"
#include "traderoutes.h"
Go to the source code of this file.
Functions | |
static bool | is_tile_seen_cadj (const struct player *pow_player, const struct tile *target_tile) |
static bool | is_tile_seen_adj (const struct player *pow_player, const struct tile *target_tile) |
static bool | is_tile_seen_city (const struct player *pow_player, const struct city *target_city) |
static bool | is_tile_seen_trade_route (const struct player *pow_player, const struct city *target_city) |
static bool | can_plr_see_all_sym_diplrels_of (const struct player *pplayer, const struct player *tplayer) |
static bool | is_req_knowable (const struct player *pov_player, const struct req_context *context, const struct player *other_player, const struct requirement *req, const enum req_problem_type prob_type) |
enum fc_tristate | mke_eval_req (const struct player *pov_player, const struct req_context *context, const struct player *other_player, const struct requirement *req, const enum req_problem_type prob_type) |
enum fc_tristate | mke_eval_reqs (const struct player *pov_player, const struct req_context *context, const struct player *other_player, const struct requirement_vector *reqs, const enum req_problem_type prob_type) |
bool | can_see_techs_of_target (const struct player *pow_player, const struct player *target_player) |
|
static |
Returns TRUE iff pplayer can see all the symmetric diplomatic relationships of tplayer.
Definition at line 129 of file metaknowledge.c.
Referenced by is_req_knowable().
bool can_see_techs_of_target | ( | const struct player * | pow_player, |
const struct player * | target_player | ||
) |
Can pow_player see the techs of target player?
Definition at line 688 of file metaknowledge.c.
Referenced by choose_tech_to_steal(), is_action_possible(), is_req_knowable(), and tech_can_be_stolen().
|
static |
Is an evaluation of the requirement accurate when pov_player evaluates it?
context may be NULL. This is equivalent to passing an empty context.
TODO: Move the data to a data file. That will
Definition at line 160 of file metaknowledge.c.
Referenced by mke_eval_req().
|
static |
Returns TRUE iff the target_tile it self and all tiles adjacent to it are seen by pow_player.
Definition at line 53 of file metaknowledge.c.
Referenced by is_req_knowable().
|
static |
Returns TRUE iff the target_tile it self and all tiles cardinally adjacent to it are seen by pow_player.
Definition at line 30 of file metaknowledge.c.
Referenced by is_req_knowable().
|
static |
Returns TRUE iff all tiles of a city are seen by pow_player.
Definition at line 75 of file metaknowledge.c.
Referenced by is_req_knowable(), and is_tile_seen_trade_route().
|
static |
Returns TRUE iff all the tiles of a city and all the tiles of its trade partners are seen by pow_player.
Definition at line 101 of file metaknowledge.c.
Referenced by is_req_knowable().
enum fc_tristate mke_eval_req | ( | const struct player * | pov_player, |
const struct req_context * | context, | ||
const struct player * | other_player, | ||
const struct requirement * | req, | ||
const enum req_problem_type | prob_type | ||
) |
Evaluate a single requirement given pov_player's knowledge.
context may be NULL. This is equivalent to passing an empty context.
Note: Assumed to use pov_player's data.
Definition at line 636 of file metaknowledge.c.
Referenced by mke_eval_reqs().
enum fc_tristate mke_eval_reqs | ( | const struct player * | pov_player, |
const struct req_context * | context, | ||
const struct player * | other_player, | ||
const struct requirement_vector * | reqs, | ||
const enum req_problem_type | prob_type | ||
) |
Evaluate a requirement vector given pov_player's knowledge.
context may be NULL. This is equivalent to passing an empty context.
Note: Assumed to use pov_player's data.
Definition at line 662 of file metaknowledge.c.
Referenced by action_enabled_local(), action_maybe_possible_actor_unit(), and is_effect_val_known().