Package pp.battleship.message.server
Klasse GameDetails
java.lang.Object
com.jme3.network.AbstractMessage
pp.battleship.message.server.ServerMessage
pp.battleship.message.server.GameDetails
- Alle implementierten Schnittstellen:
com.jme3.network.Message
A message sent by the server to provide details about the game configuration.
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungGameDetails(BattleshipConfig config) Constructs a GameDetails message with the specified BattleshipConfig. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaccept(ServerInterpreter interpreter) Accepts a visitor to process this message.intReturns the height of the game map.Returns the key for the informational text associated with this message.Returns a map where the keys represent ship lengths and the values represent the number of ships of that length.intgetWidth()Returns the width of the game map.toString()Returns a string representation of the GameDetails message.Von Klasse geerbte Methoden com.jme3.network.AbstractMessage
isReliable, setReliable
-
Konstruktordetails
-
GameDetails
Constructs a GameDetails message with the specified BattleshipConfig.- Parameter:
config- the BattleshipConfig containing game configuration details
-
-
Methodendetails
-
accept
Accepts a visitor to process this message.- Angegeben von:
acceptin KlasseServerMessage- Parameter:
interpreter- the visitor to process this message
-
getShipNums
Returns a map where the keys represent ship lengths and the values represent the number of ships of that length.- Gibt zurück:
- a map of ship lengths to the number of ships
-
getWidth
public int getWidth()Returns the width of the game map.- Gibt zurück:
- the width of the game map
-
getHeight
public int getHeight()Returns the height of the game map.- Gibt zurück:
- the height of the game map
-
toString
Returns a string representation of the GameDetails message. -
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
-