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 Player
Room. afterGamePlayStarted()
Event-Handler/Callback called after new game play message is sent - should return the first turn playerprotected Player
Room. afterTurnPlayed(Player player, String action, JsonObject actionData)
Event-Handler/Callback called after player plays turn.Player
Room. getCurTurnPlayer()
Returns the player whose turn is the current turnPlayer
Room. getFirstActivePlayer()
Returns the first active playerPlayer
Room. getFirstPlayer()
Returns the first player in the roomPlayer
Room. getNextActivePlayer()
returns the next active player seated after the current turn player.Player
Room. getNextActivePlayer(int prevSeatNo)
returns the next active player seated after the specified seat number.Player
Room. getNextActivePlayerWhoCanPlayTurn()
Returns the next active player after the current player who can play a turn (player.canPlayTurn() returns true).Player
Room. getNextActivePlayerWhoCanPlayTurn(int prevSeatNo)
Returns the next active player after the specified seat number who can play a turn (player.canPlayTurn() returns true).Player
Room. getNextPlayer(int prevSeatNo)
Returns the next player seated after the specified seat numberPlayer
Session. getPlayer()
Returns the player instance associated with this sessionPlayer
Room. getPlayerBySeatNo(int seatNo)
Returns player seated at the specified seat numberprotected abstract Player
Room. 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 void
Room. afterSeatLeft(Player player, boolean isCurTurnPlayer, int noOfActivePlayers, boolean isLeavingRoom, boolean isLoggingOut)
Event-Handler/Callback called after seat left message is sentprotected void
Room. afterSeatTaken(Player player)
Event-Handler/Callback called after seatTaken message is sent.protected Player
Room. afterTurnPlayed(Player player, String action, JsonObject actionData)
Event-Handler/Callback called after player plays turn.protected void
Room. beforeSeatLeft(Player player, boolean isCurTurnPlayer, boolean isLeavingRoom, boolean isLoggingOut)
Event-Handler/Callback called before player leaves/evicted from the seat.void
Room. forceAction(Player player, String action, JsonObject actionData)
Forces an action on the specified player.protected abstract JsonObject
Room. getNextTurnData(Player nextTurnPlayer)
returns the data to be sent to the client along with the nextTurn event/message to clients.void
Room. leaveSeat(Player player)
Evicts the specified player from his/her seat.protected void
Room. 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 void
Room. onSeatTaken(Player player)
Event-Handler/Callback called after player is seated but before seatTaken message is sent to clients.protected void
Room. onTurnTimedOut(Player turnPlayer)
Event-Handler/Callback called when player's turn times out.void
Room. sendRoomDataToSession(Player player)
Sends Room Data to the specified player's client session