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 Details

    • userId

      public final String userId
      The userId of this player.
    • seatNo

      public final int seatNo
      The seat number of the player. The first seat number is 1
    • room

      public volatile Room room
      The room in which the player is seated
  • Method Details

    • getName

      public String 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

      public JsonObject 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

      public boolean isSameAsBot​(Bot bot)
      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