Package pacManReloaded.common.messages
Class GameFinishedMessage
- java.lang.Object
-
- pacManReloaded.common.messages.GameFinishedMessage
-
-
Constructor Summary
Constructors Constructor Description GameFinishedMessage(java.lang.String buffer)Constructor of the class, splits the given string in an arrayGameFinishedMessage(java.lang.String answer, java.lang.String balance)Constructor of the class
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAnswer()"getter" for the answerjava.lang.StringgetBalance()"getter" for the balanceCommandgetType()"getter" for type of the commandjava.lang.StringtoString()the to String method, forms the message into a string, seperated by "|"
-
-
-
Constructor Detail
-
GameFinishedMessage
public GameFinishedMessage(java.lang.String buffer)
Constructor of the class, splits the given string in an array- Parameters:
buffer- string which splits
-
GameFinishedMessage
public GameFinishedMessage(java.lang.String answer, java.lang.String balance)Constructor of the class- Parameters:
answer- answer of the questionbalance- balance(/money) of the player
-
-
Method Detail
-
toString
public java.lang.String toString()
the to String method, forms the message into a string, seperated by "|"- Overrides:
toStringin classjava.lang.Object- Returns:
- string which contains the command type, the answer and the balance of the player seperated by a "|"
-
getType
public Command getType()
"getter" for type of the command
-
getBalance
public java.lang.String getBalance()
"getter" for the balance- Returns:
- balance
-
getAnswer
public java.lang.String getAnswer()
"getter" for the answer- Returns:
- answer
-
-