Package pp.battleship.message.server
Klasse StartBattleMessage
java.lang.Object
com.jme3.network.AbstractMessage
pp.battleship.message.server.ServerMessage
pp.battleship.message.server.StartBattleMessage
- Alle implementierten Schnittstellen:
com.jme3.network.Message
A message sent by the server to inform clients about the start of the battle.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungStartBattleMessage(boolean myTurn) Constructs a StartBattleMessage with the specified turn indicator. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaccept(ServerInterpreter interpreter) Accepts a visitor to process this message.Returns the key for the informational text associated with this message.booleanisMyTurn()Checks if it's the client's turn to shoot.toString()Returns a string representation of the StartBattleMessage.Von Klasse geerbte Methoden com.jme3.network.AbstractMessage
isReliable, setReliable
-
Konstruktordetails
-
StartBattleMessage
public StartBattleMessage(boolean myTurn) Constructs a StartBattleMessage with the specified turn indicator.- Parameter:
myTurn- true if it's the client's turn to shoot, false otherwise
-
-
Methodendetails
-
accept
Accepts a visitor to process this message.- Angegeben von:
acceptin KlasseServerMessage- Parameter:
interpreter- the visitor to process this message
-
isMyTurn
public boolean isMyTurn()Checks if it's the client's turn to shoot.- Gibt zurück:
- true if it's the client's turn, false otherwise
-
toString
Returns a string representation of the StartBattleMessage. -
getInfoTextKey
Returns the key for the informational text associated with this message.- Angegeben von:
getInfoTextKeyin KlasseServerMessage- Gibt zurück:
- the key for the informational text
-