Package org.swtpra1.messages
Class TurnMessage
- java.lang.Object
-
- org.swtpra1.messages.TurnMessage
-
public class TurnMessage extends java.lang.Object
This class represents the incoming JSON start message from the game server.
-
-
Field Summary
Fields Modifier and Type Field Description Board
board
A representation of the board as described above.Turn
enemyTurn
The last turn the other player made.int
gameId
ID of the game used to keep track of different games played simultaneously.java.lang.String
messageType
Represents the type of the message and is always turn for a turn message.int
playerId
The ID of the player within the game (0 or 1).int
turnId
ID of the turn (starting with 0).
-
Constructor Summary
Constructors Constructor Description TurnMessage()
-
-
-
Field Detail
-
messageType
public java.lang.String messageType
Represents the type of the message and is always turn for a turn message.
-
gameId
public int gameId
ID of the game used to keep track of different games played simultaneously.
-
turnId
public int turnId
ID of the turn (starting with 0).
-
playerId
public int playerId
The ID of the player within the game (0 or 1). Players will start within the order of their IDs.
-
board
public Board board
A representation of the board as described above.
-
enemyTurn
public Turn enemyTurn
The last turn the other player made. This element is missing for the first turn message of a game.
-
-