| 1 | <?php |
||
| 12 | class HangmanGameLostEvent extends HangmanBasicResultEvent implements AllPlayersResult, SerializableInterface, GameLost |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | const NAME = 'hangman.lost'; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private $word; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Constructor |
||
| 26 | * |
||
| 27 | * @param MiniGameId $gameId |
||
| 28 | * @param PlayerId $playerId |
||
| 29 | * @param string $word |
||
| 30 | */ |
||
| 31 | 12 | public function __construct(MiniGameId $gameId, PlayerId $playerId, $word) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | 6 | public function getWord() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | 3 | public function getAsMessage() |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | 3 | public function getSolution() |
|
| 60 | |||
| 61 | /** |
||
| 62 | * @return array |
||
| 63 | */ |
||
| 64 | 3 | public function serialize() |
|
| 73 | |||
| 74 | /** |
||
| 75 | * @param array $data |
||
| 76 | * @return HangmanGameLostEvent |
||
| 77 | */ |
||
| 78 | 3 | public static function deserialize(array $data) |
|
| 86 | } |
||
| 87 |