|
@@ -17,15 +17,12 @@ VCMI_LIB_NAMESPACE_BEGIN
|
|
|
|
|
|
class CRandomGenerator;
|
|
class CRandomGenerator;
|
|
|
|
|
|
-namespace EPlayerType
|
|
|
|
|
|
+enum class EPlayerType
|
|
{
|
|
{
|
|
- enum EPlayerType
|
|
|
|
- {
|
|
|
|
- HUMAN,
|
|
|
|
- AI,
|
|
|
|
- COMP_ONLY
|
|
|
|
- };
|
|
|
|
-}
|
|
|
|
|
|
+ HUMAN,
|
|
|
|
+ AI,
|
|
|
|
+ COMP_ONLY
|
|
|
|
+};
|
|
|
|
|
|
/// The map gen options class holds values about general map generation settings
|
|
/// The map gen options class holds values about general map generation settings
|
|
/// e.g. the size of the map, the count of players,...
|
|
/// e.g. the size of the map, the count of players,...
|
|
@@ -49,8 +46,8 @@ public:
|
|
void setStartingTown(si32 value);
|
|
void setStartingTown(si32 value);
|
|
|
|
|
|
/// The default value is EPlayerType::AI.
|
|
/// The default value is EPlayerType::AI.
|
|
- EPlayerType::EPlayerType getPlayerType() const;
|
|
|
|
- void setPlayerType(EPlayerType::EPlayerType value);
|
|
|
|
|
|
+ EPlayerType getPlayerType() const;
|
|
|
|
+ void setPlayerType(EPlayerType value);
|
|
|
|
|
|
/// Team id for this player. TeamID::NO_TEAM by default - team will be randomly assigned
|
|
/// Team id for this player. TeamID::NO_TEAM by default - team will be randomly assigned
|
|
TeamID getTeam() const;
|
|
TeamID getTeam() const;
|
|
@@ -62,7 +59,7 @@ public:
|
|
private:
|
|
private:
|
|
PlayerColor color;
|
|
PlayerColor color;
|
|
si32 startingTown;
|
|
si32 startingTown;
|
|
- EPlayerType::EPlayerType playerType;
|
|
|
|
|
|
+ EPlayerType playerType;
|
|
TeamID team;
|
|
TeamID team;
|
|
|
|
|
|
public:
|
|
public:
|
|
@@ -122,7 +119,7 @@ public:
|
|
void setStartingTownForPlayer(const PlayerColor & color, si32 town);
|
|
void setStartingTownForPlayer(const PlayerColor & color, si32 town);
|
|
/// Sets a player type for a standard player. A standard player is the opposite of a computer only player. The
|
|
/// Sets a player type for a standard player. A standard player is the opposite of a computer only player. The
|
|
/// values which can be chosen for the player type are EPlayerType::AI or EPlayerType::HUMAN.
|
|
/// values which can be chosen for the player type are EPlayerType::AI or EPlayerType::HUMAN.
|
|
- void setPlayerTypeForStandardPlayer(const PlayerColor & color, EPlayerType::EPlayerType playerType);
|
|
|
|
|
|
+ void setPlayerTypeForStandardPlayer(const PlayerColor & color, EPlayerType playerType);
|
|
|
|
|
|
void setPlayerTeam(const PlayerColor & color, const TeamID & team = TeamID::NO_TEAM);
|
|
void setPlayerTeam(const PlayerColor & color, const TeamID & team = TeamID::NO_TEAM);
|
|
|
|
|