SimplifiedPlayer
python
class SimplifiedPlayer(BaseModel):
id: PlayerID
smallID: PlayerSmallID
name: str
type: str
isAlive: bool
isTraitor: bool
alliances: List[SimplifiedAlliance]
numTilesOwned: int
idleTroops: float
totalTroops: float
maxTroops: float
neighbors: List[Optional[PlayerID]]
ongoingAttacks: List[SimplifiedAttack]
incomingAttacks: List[SimplifiedAttack]
outgoingAllianceRequests: List[SimplifiedAllianceRequest]
incomingAllianceRequests: List[SimplifiedAllianceRequest]java
public static class SimplifiedPlayer {
@NotNull public PlayerID id;
@NotNull public PlayerSmallID smallID;
@NotNull public String name;
@NotNull public String type;
public boolean isAlive;
public boolean isTraitor;
@NotNull public List<@NotNull SimplifiedAlliance> alliances;
public int numTilesOwned;
public double idleTroops;
public double attackingTroops;
public double totalTroops;
public double maxTroops;
@NotNull public List<@Nullable PlayerID> neighbors;
@NotNull public List<@NotNull SimplifiedAttack> ongoingAttacks;
@NotNull public List<@NotNull SimplifiedAttack> incomingAttacks;
@NotNull public List<@NotNull SimplifiedAllianceRequest> outgoingAllianceRequests;
@NotNull public List<@NotNull SimplifiedAllianceRequest> incomingAllianceRequests;
}Encapsulates information about a player in an ongoing game.
You can obtain the information about a player corresponding to a given PlayerID by looking in the players attribute of a SimplifiedGame instance.
Attributes
| Attribute | Type | Description |
|---|---|---|
id | PlayerID | Unique identifier for the player. |
smallID | PlayerSmallID | A smaller identifier for the player, used in certain contexts. |
name | str | The player's display name (username). |
type | str | The type of player (either BOT, HUMAN or FAKEHUMAN). Note that ConquerHack bots built with the scaffold will appear as HUMAN. |
isAlive | bool | Whether the player is currently alive in the game. |
isTraitor | bool | Whether the player has a debuff applied causing them to have weaker defenses for a certain amount of time. |
alliances | List of SimplifiedAlliance | A list of the player's current alliances. |
numTilesOwned | int | The number of map tiles currently owned by the player. |
idleTroops | float | The number of troops the player currently has that are not involved in attacks. |
totalTroops | float | The total number of troops the player currently has, including those involved in attacks. |
maxTroops | float | The maximum number of troops the player can have at once, determined by the number of tiles they own (since buildings are disabled). |
neighbors | List of PlayerID or None/null | A list of the player's neighboring players (i.e. those who they share a border with). If some unoccupied territory is adjacent to the player, a None/null entry will be included. |
ongoingAttacks | List of SimplifiedAttack | A list of the player's ongoing attacks (i.e. those that have been initiated by that player but have not yet ended). |
incomingAttacks | List of SimplifiedAttack | A list of the player's incoming attacks (i.e. those that have been initiated by other players targeting that player but have not yet ended). |
outgoingAllianceRequests | List of SimplifiedAllianceRequest | A list of the alliance requests that player has sent that do not yet have a response. |
incomingAllianceRequests | List of SimplifiedAllianceRequest | A list of the alliance requests that player has received that do not yet have a response. |
