WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Civ Class Reference

#include <Civ.hpp>

Inheritance diagram for Civ:
Inheritance graph
[legend]
Collaboration diagram for Civ:
Collaboration graph
[legend]

Public Member Functions

 Civ ()
 
void addContact (Civ *)
 
void addSettlement (Settlement *)
 
void manageArmy ()
 
void init (World *)
 
void collectTaxes ()
 
void logicTick ()
 
void setColour (const int, const int, const int)
 
bool spawn ()
 
void incrementTicks (int)
 
void updateFogOfWar ()
 
int neighboringFog (int _x, int _y)
 
void foggiestNeighbor (int _x, int _y, int *_rx, int *_ry, bool _landOnly)
 
void getExploreTile (int *_rx, int *_ry, bool _land)
 
int getPopulation ()
 
void garbageCollect ()
 
void aiDay ()
 
void aiSecond ()
 
bool knowsAbout (Civ *)
 
bool atWarWith (Civ *)
 
bool canSee (const int _x, const int _y)
 
std::string getColumn (std::string _column)
 
std::string getColumnType (std::string _column)
 

Public Attributes

Vector< Civ * > vAtWar
 
Vector< Civ * > vAware
 
ArrayS2< bool > aVisible
 
Vector< Character * > vCharacter
 
Vector< Settlement * > vSettlement
 
std::string name
 
int money
 
Worldworld
 
int nSoldiers
 
int colourRed
 
int colourGreen
 
int colourBlue
 
int race
 

Static Public Attributes

static ArrayS2< Civ * > aOwnership
 

Constructor & Destructor Documentation

◆ Civ()

Civ::Civ ( )

Member Function Documentation

◆ addContact()

void Civ::addContact ( Civ )

◆ addSettlement()

void Civ::addSettlement ( Settlement _settlement)

◆ aiDay()

void Civ::aiDay ( )

◆ aiSecond()

void Civ::aiSecond ( )

◆ atWarWith()

bool Civ::atWarWith ( Civ )

◆ canSee()

bool Civ::canSee ( const int  _x,
const int  _y 
)

◆ collectTaxes()

void Civ::collectTaxes ( )

◆ foggiestNeighbor()

void Civ::foggiestNeighbor ( int  _x,
int  _y,
int *  _rx,
int *  _ry,
bool  _landOnly 
)

◆ garbageCollect()

void Civ::garbageCollect ( )

◆ getColumn()

std::string Civ::getColumn ( std::string  _column)

◆ getColumnType()

std::string Civ::getColumnType ( std::string  _column)

◆ getExploreTile()

void Civ::getExploreTile ( int *  _rx,
int *  _ry,
bool  _land 
)

◆ getPopulation()

int Civ::getPopulation ( )

◆ incrementTicks()

void Civ::incrementTicks ( int  nTicks)

◆ init()

void Civ::init ( World _world)

◆ knowsAbout()

bool Civ::knowsAbout ( Civ )

◆ logicTick()

void Civ::logicTick ( )

◆ manageArmy()

void Civ::manageArmy ( )

◆ neighboringFog()

int Civ::neighboringFog ( int  _x,
int  _y 
)

◆ setColour()

void Civ::setColour ( const int  r,
const int  g,
const int  b 
)

◆ spawn()

bool Civ::spawn ( )

◆ updateFogOfWar()

void Civ::updateFogOfWar ( )

Member Data Documentation

◆ aOwnership

ArrayS2<Civ*> Civ::aOwnership
static

◆ aVisible

ArrayS2<bool> Civ::aVisible

◆ colourBlue

int Civ::colourBlue

◆ colourGreen

int Civ::colourGreen

◆ colourRed

int Civ::colourRed

◆ money

int Civ::money

◆ name

std::string Civ::name

◆ nSoldiers

int Civ::nSoldiers

◆ race

int Civ::race

◆ vAtWar

Vector<Civ*> Civ::vAtWar

◆ vAware

Vector<Civ*> Civ::vAware

◆ vCharacter

Vector<Character*> Civ::vCharacter

◆ vSettlement

Vector<Settlement*> Civ::vSettlement

◆ world

World* Civ::world

The documentation for this class was generated from the following files: