Package pacManReloaded.common.messages

## Class GameFinishedMessage

- java.lang.Object
- - pacManReloaded.common.messages.GameFinishedMessage

- All Implemented Interfaces:
    `IMessage`

      public class GameFinishedMessage
      extends java.lang.Object
      implements IMessage

- - ### Field Summary

    - ### Fields inherited from interface pacManReloaded.common.messages.IMessage

      `separator`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `GameFinishedMessage​(java.lang.String buffer)` | Constructor of the class, splits the given string in an array
    `GameFinishedMessage​(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.String` | `getAnswer()` | "getter" for the answer
    `java.lang.String` | `getBalance()` | "getter" for the balance
    `Command` | `getType()` | "getter" for type of the command
    `java.lang.String` | `toString()` | the to String method, forms the message into a string, seperated by "|"

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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 question
        `balance` - 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:
        `toString` in class `java.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
      Specified by:
        `getType` in interface `IMessage`
      Returns:
        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