stmm-games-doc  0.32.0
Public Member Functions | Public Attributes | List of all members
stmg::AppConstraints Class Reference
Inheritance diagram for stmg::AppConstraints:
Inheritance graph
[legend]

Public Member Functions

bool isValid () const noexcept
 
int32_t getMaxTeams () const noexcept
 The real max number of teams. More...
 
int32_t getMaxTeammates () const noexcept
 The real max number of teammates. More...
 
int32_t getMaxPlayers () const noexcept
 The real max number of players. More...
 
bool allowsAI () const noexcept
 Whether AI players are allowed. More...
 

Public Attributes

int32_t m_nTeamsMin = 1
 Must be positive. More...
 
int32_t m_nTeamsMax = 4
 Default is 4. More...
 
int32_t m_nMatesPerTeamMax = 3
 Must be positive. More...
 
int32_t m_nPlayersMax = 12
 Must be positive. More...
 
int32_t m_nAIMatesPerTeamMax = 1
 Cannot be negative. More...
 
bool m_bAllowMixedAIHumanTeam = false
 Default is false. More...
 

Member Function Documentation

◆ allowsAI()

bool stmg::AppConstraints::allowsAI ( ) const
inlinenoexcept

Whether AI players are allowed.

Returns
Whether a team can have an AI mate.

◆ getMaxPlayers()

int32_t stmg::AppConstraints::getMaxPlayers ( ) const
inlinenoexcept

The real max number of players.

Takes also max number of teams and teammates into account.

Returns
The max number of players.

◆ getMaxTeammates()

int32_t stmg::AppConstraints::getMaxTeammates ( ) const
inlinenoexcept

The real max number of teammates.

Takes also max number of players into account.

Returns
The max number of team mates.

◆ getMaxTeams()

int32_t stmg::AppConstraints::getMaxTeams ( ) const
inlinenoexcept

The real max number of teams.

Takes also max number of players into account.

Returns
The max number of teams.

◆ isValid()

bool stmg::AppConstraints::isValid ( ) const
noexcept

Member Data Documentation

◆ m_bAllowMixedAIHumanTeam

bool stmg::AppConstraints::m_bAllowMixedAIHumanTeam = false

Default is false.

◆ m_nAIMatesPerTeamMax

int32_t stmg::AppConstraints::m_nAIMatesPerTeamMax = 1

Cannot be negative.

Default is 1.

◆ m_nMatesPerTeamMax

int32_t stmg::AppConstraints::m_nMatesPerTeamMax = 3

Must be positive.

Default is 3.

◆ m_nPlayersMax

int32_t stmg::AppConstraints::m_nPlayersMax = 12

Must be positive.

Default is 12.

◆ m_nTeamsMax

int32_t stmg::AppConstraints::m_nTeamsMax = 4

Default is 4.

◆ m_nTeamsMin

int32_t stmg::AppConstraints::m_nTeamsMin = 1

Must be positive.

Default is 1.