Uses of Class
io.sockit.gameserver.Player
| Package | Description |
|---|---|
| io.sockit.gameserver |
This is the core package for the Sockit Multiplayer Game (Server) Engine and provides the classes necessary to implement the server side of a multiplayer turn based game.
|
-
Uses of Player in io.sockit.gameserver
Methods in io.sockit.gameserver that return Player Modifier and Type Method Description protected PlayerRoom. afterGamePlayStarted()Event-Handler/Callback called after new game play message is sent - should return the first turn playerprotected PlayerRoom. afterTurnPlayed(Player player, String action, JsonObject actionData)Event-Handler/Callback called after player plays turn.PlayerRoom. getCurTurnPlayer()Returns the player whose turn is the current turnPlayerRoom. getFirstActivePlayer()Returns the first active playerPlayerRoom. getFirstPlayer()Returns the first player in the roomPlayerRoom. getNextActivePlayer()returns the next active player seated after the current turn player.PlayerRoom. getNextActivePlayer(int prevSeatNo)returns the next active player seated after the specified seat number.PlayerRoom. getNextActivePlayerWhoCanPlayTurn()Returns the next active player after the current player who can play a turn (player.canPlayTurn() returns true).PlayerRoom. getNextActivePlayerWhoCanPlayTurn(int prevSeatNo)Returns the next active player after the specified seat number who can play a turn (player.canPlayTurn() returns true).PlayerRoom. getNextPlayer(int prevSeatNo)Returns the next player seated after the specified seat numberPlayerSession. getPlayer()Returns the player instance associated with this sessionPlayerRoom. getPlayerBySeatNo(int seatNo)Returns player seated at the specified seat numberprotected abstract PlayerRoom. newPlayer(Session session, int SeatNo, JsonObject data)Factory method called to instantiate a new player.Methods in io.sockit.gameserver that return types with arguments of type Player Modifier and Type Method Description Iterable<Player>Room. getActivePlayers()Returns all the players active in the current game playIterable<Player>Room. getPlayers()Returns all the players in the roomIterable<Player>Room. getPlayersWhoPlayed()Returns all the players who took part in the current game play.Methods in io.sockit.gameserver with parameters of type Player Modifier and Type Method Description protected voidRoom. afterSeatLeft(Player player, boolean isCurTurnPlayer, int noOfActivePlayers, boolean isLeavingRoom, boolean isLoggingOut)Event-Handler/Callback called after seat left message is sentprotected voidRoom. afterSeatTaken(Player player)Event-Handler/Callback called after seatTaken message is sent.protected PlayerRoom. afterTurnPlayed(Player player, String action, JsonObject actionData)Event-Handler/Callback called after player plays turn.protected voidRoom. beforeSeatLeft(Player player, boolean isCurTurnPlayer, boolean isLeavingRoom, boolean isLoggingOut)Event-Handler/Callback called before player leaves/evicted from the seat.voidRoom. forceAction(Player player, String action, JsonObject actionData)Forces an action on the specified player.protected abstract JsonObjectRoom. getNextTurnData(Player nextTurnPlayer)returns the data to be sent to the client along with the nextTurn event/message to clients.voidRoom. leaveSeat(Player player)Evicts the specified player from his/her seat.protected voidRoom. onPlayerAction(Player player, String action, JsonObject data, boolean isOutOfTurn)Event-Handler/Callback called when player plays turn - should call actionPlayed() (this will send turnPlayed or outOfTurnPlayed event/message to clients)protected voidRoom. onSeatTaken(Player player)Event-Handler/Callback called after player is seated but before seatTaken message is sent to clients.protected voidRoom. onTurnTimedOut(Player turnPlayer)Event-Handler/Callback called when player's turn times out.voidRoom. sendRoomDataToSession(Player player)Sends Room Data to the specified player's client session