Freeciv21
Develop your civilization from humble roots to a global empire
cm_tile_type Struct Reference

A tile type. More...

Public Attributes

int production [O_LAST]
 
double estimated_fitness
 
bool is_specialist
 
Specialist_type_id spec
 
struct tile_vector tiles
 
struct tile_type_vector better_types
 
struct tile_type_vector worse_types
 
int lattice_index
 
int lattice_depth
 

Detailed Description

A tile type.

Holds the production (a hill produces 1/0/0); Holds a list of which tiles match this (all the hills and tundra); Holds a list of other types that are strictly better (grassland 2/0/0, plains 1/1/0, but not gold mine 0/1/6). Holds a list of other types that are strictly worse (the grassland and plains hold a pointer to the hill).

Specialists are special types; is_specialist is set, and the tile vector is empty. We can never run out of specialists.

Definition at line 162 of file cm.cpp.

Member Data Documentation

◆ better_types

struct tile_type_vector cm_tile_type::better_types

◆ estimated_fitness

double cm_tile_type::estimated_fitness

Definition at line 164 of file cm.cpp.

Referenced by compare_tile_type_by_fitness().

◆ is_specialist

◆ lattice_depth

int cm_tile_type::lattice_depth

Definition at line 171 of file cm.cpp.

Referenced by clean_lattice(), and compare_tile_type_by_lattice_order().

◆ lattice_index

int cm_tile_type::lattice_index

Definition at line 170 of file cm.cpp.

Referenced by clean_lattice(), and tile_type_lattice_add().

◆ production

◆ spec

Specialist_type_id cm_tile_type::spec

Definition at line 166 of file cm.cpp.

Referenced by apply_solution(), and init_specialist_lattice_nodes().

◆ tiles

struct tile_vector cm_tile_type::tiles

◆ worse_types

struct tile_type_vector cm_tile_type::worse_types