Tribe.hpp - RyanBabij/WorldSim GitHub Wiki
Tribes are objects which are spawned when the world is created.
Implements
- WorldObjectGlobal.hpp
- Must have an x,y coordinate on the world map.
- Must return a texture to display.
- TableInterface.hpp
- Must return strings in response to queries.
Variables
- Name - The name of the tribe.
- A unique colour to identify it.
- A race enum (DWARVEN/HUMAN/ELVEN).
- A pointer to the World.
- A list of all tile coordinates claimed by the tribe.
Functions
Init
Handles initialisation beyond constructor.
Spawn
Handles placement in the World.
IncrementTicks
Will simulate the tribe for the given number of ticks.
Virtual functions
Wander
A function called when the Tribe has no other useful action to perform. The Tribe will move to another tile.