Package io.sockit.gameserver.bot
Class Player
java.lang.Object
io.sockit.gameserver.bot.Player
public class Player extends Object
This class represents a Player seated in the room for a Bot
-
Field Summary
-
Method Summary
Modifier and Type Method Description JsonObject
getData()
Returns the player's data as jsonString
getName()
The name of the playerint
getTurnTimeLeftMillis()
Returns the turn time left in millisecondsboolean
isActive()
Returns true if the player is an active player (taking part in the current game play)boolean
isCurTurn()
Returns true if the current turn is the players turnboolean
isSameAsBot(Bot bot)
Returns true if the player belongs to the specified bot
-
Field Details
-
Method Details
-
getName
The name of the player- Returns:
- String - the name of the player
-
isActive
public boolean isActive()Returns true if the player is an active player (taking part in the current game play)- Returns:
- boolean - true if the player is an active player
-
getTurnTimeLeftMillis
public int getTurnTimeLeftMillis()Returns the turn time left in milliseconds- Returns:
- int - the turn time left in milliseconds
-
getData
Returns the player's data as json- Returns:
- JsonObject - the player's data as json
-
isCurTurn
public boolean isCurTurn()Returns true if the current turn is the players turn- Returns:
- boolean - true if the current turn is the players turn
-
isSameAsBot
Returns true if the player belongs to the specified bot- Parameters:
bot
- - the bot to check- Returns:
- boolean - true if the player belongs to the specified bot
-