ANTWAR C++ SDK
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Base Struct Reference

Target to protect or to destroy. More...

#include <common.hpp>

Public Member Functions

 Base (int player)
 
optional< Antgenerate_ant (int id, int round)
 Try to generate a new ant.
 
void upgrade_generation_speed ()
 Upgrade ant generation speed.
 
void upgrade_generated_ant ()
 Upgrade ant generation speed.
 

Public Attributes

const int player
 
const int x
 
const int y
 
int hp
 
int gen_speed_level
 Level of production speed.
 
int ant_level
 Level of produced ants.
 

Static Public Attributes

static constexpr int MAX_HP = 50
 
static constexpr int POSITION [2][2] = {{2, EDGE - 1}, {(MAP_SIZE - 1) - 2, EDGE - 1}}
 Positions for both players.
 
static constexpr int GENERATION_CYCLE_INFO [] = {4, 2, 1}
 Ants will be generated when round index can be divided by this value.
 

Detailed Description

Target to protect or to destroy.

Member Function Documentation

◆ generate_ant()

optional< Ant > Base::generate_ant ( int  id,
int  round 
)
inline

Try to generate a new ant.

Parameters
idID for the ant to be generated.
roundBirth round for the ant to be generated.
Returns
The ant if successfully generated, or nothing.

The documentation for this struct was generated from the following file: