This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
BWMirror-Generator/bwapi4-includes/BWAPI/Playerset.h

46 lines
1.2 KiB
C
Raw Normal View History

#pragma once
2015-02-07 12:16:07 -05:00
#include "SetContainer.h"
#include <BWAPI/Race.h>
#include <BWAPI/Filters.h>
namespace BWAPI
{
// Forward Declarations
class PlayerInterface;
typedef PlayerInterface *Player;
class Unitset;
2016-02-28 08:49:15 -05:00
/// <summary>A set containing Player objects.</summary>
2015-02-07 12:16:07 -05:00
class Playerset : public SetContainer<BWAPI::Player, std::hash<void*>>
{
public:
2016-02-28 08:49:15 -05:00
/// <summary>Returns the set of all units that every player in this set owns.</summary>
///
/// @returns Unitset containing Playerset's units
/// @see PlayerInterface::getUnits
Unitset getUnits() const;
2016-02-28 08:49:15 -05:00
/// <summary>Returns the list of races that each player in the set is.</summary>
///
/// @returns Race::set containing Playerset's races
/// @see PlayerInterface::getRace
Race::set getRaces() const;
2016-02-28 08:49:15 -05:00
/// <summary>Sets the alliance status with all players contained in the Playerset.</summary>
///
/// <param name="allies">
/// Set to true to set the player to allied, or false for enemy.
/// </param>
/// <param name="alliedVictory">
/// Set to true to turn on allied victory, or false to disable it.
/// </param>
///
/// @see Game::setAlliance
void setAlliance(bool allies = true, bool alliedVictory = true);
};
}