BWAPI::Playerset class

A set containing Player objects.

Contents

Base classes

template<class T, typename Compare = std::less<>>
class SetContainer<BWAPI::Player, IDCompare>
This container is used to wrap convenience functions for BWAPI and be used as a bridge with a built-in set type.

Public functions

auto getRaces() const -> Race::set
Returns the list of races that each player in the set is.
auto getUnits() const -> Unitset
Returns the set of all units that every player in this set owns.
void setAlliance(bool allies = true, bool alliedVictory = true)
Sets the alliance status with all players contained in the Playerset.

Function documentation

Race::set BWAPI::Playerset::getRaces() const

Returns the list of races that each player in the set is.

Returns Race::set containing Playerset's races

Unitset BWAPI::Playerset::getUnits() const

Returns the set of all units that every player in this set owns.

Returns Unitset containing Playerset's units

void BWAPI::Playerset::setAlliance(bool allies = true, bool alliedVictory = true)

Sets the alliance status with all players contained in the Playerset.

Parameters
allies Set to true to set the player to allied, or false for enemy.
alliedVictory Set to true to turn on allied victory, or false to disable it.