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

public class StartBattleMessage extends ServerMessage
A message sent by the server to inform clients about the start of the battle.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    StartBattleMessage(boolean myTurn)
    Constructs a StartBattleMessage with the specified turn indicator.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    Accepts a visitor to process this message.
    Returns the key for the informational text associated with this message.
    boolean
    Checks if it's the client's turn to shoot.
    Returns a string representation of the StartBattleMessage.

    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

    • 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

      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
    • 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

      public String toString()
      Returns a string representation of the StartBattleMessage.
      Setzt außer Kraft:
      toString in Klasse Object
      Gibt zurück:
      a string representation of the StartBattleMessage
    • 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