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

public class GameDetails extends ServerMessage
A message sent by the server to provide details about the game configuration.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Constructs a GameDetails message with the specified BattleshipConfig.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    Accepts a visitor to process this message.
    int
    Returns 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.
    int
    Returns the width of the game map.
    Returns a string representation of the GameDetails message.

    Von Klasse geerbte Methoden com.jme3.network.AbstractMessage

    isReliable, setReliable

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Konstruktordetails

    • GameDetails

      public GameDetails(BattleshipConfig config)
      Constructs a GameDetails message with the specified BattleshipConfig.
      Parameter:
      config - the BattleshipConfig containing game configuration details
  • Methodendetails

    • accept

      public void accept(ServerInterpreter interpreter)
      Accepts a visitor to process this message.
      Angegeben von:
      accept in Klasse ServerMessage
      Parameter:
      interpreter - the visitor to process this message
    • getShipNums

      public Map<Integer,Integer> 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

      public String toString()
      Returns a string representation of the GameDetails message.
      Setzt außer Kraft:
      toString in Klasse Object
      Gibt zurück:
      a string representation of the GameDetails message
    • getInfoTextKey

      public String getInfoTextKey()
      Returns the key for the informational text associated with this message.
      Angegeben von:
      getInfoTextKey in Klasse ServerMessage
      Gibt zurück:
      the key for the informational text