Class Player
- java.lang.Object
-
- be.yildizgames.engine.feature.player.Player
-
public final class Player extends Object
Base class for player in the game, class is immutable.- Author:
- Grégory Van den Borre
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAlly(Player ally)Add an ally.booleanequals(Object obj)inthashCode()booleanisSeeing(be.yildizgames.common.model.EntityId id)booleannoLongerSee(be.yildizgames.common.model.EntityId id)booleansee(be.yildizgames.common.model.EntityId id)StringtoString()
-
-
-
Field Detail
-
WORLD
public static final Player WORLD
World constant, to use with neutral units.
-
id
public final be.yildizgames.common.model.PlayerId id
Player unique id.
-
name
public final String name
Player unique name.
-
role
public final PlayerRight role
Player's role.
-
-
Method Detail
-
addAlly
public void addAlly(Player ally)
Add an ally.- Parameters:
ally- Player to set as ally.
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
see
public boolean see(be.yildizgames.common.model.EntityId id)
-
noLongerSee
public boolean noLongerSee(be.yildizgames.common.model.EntityId id)
-
isSeeing
public boolean isSeeing(be.yildizgames.common.model.EntityId id)
-
-