Tribe.hpp - RyanBabij/WorldSim GitHub Wiki

Tribes are objects which are spawned when the world is created.

Implements

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.

Child classes