2026-10-16 11:09:16 +03:00
|
|
|
package app.playmancala.model;
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
|
|
|
|
|
|
|
|
|
// on_game_end, sent to the players and spectators of a live game when it ends for any reason. `result` is null (and
|
2026-10-17 02:00:44 +03:00
|
|
|
// sent as null) when the game ended without a winner. `series` includes the game that ended.
|
|
|
|
|
@JsonPropertyOrder({ "gameId", "result", "endReason", "clock", "winnerId", "leftUserId", "series" })
|
2026-10-16 11:09:16 +03:00
|
|
|
public record GameEndMessage(
|
|
|
|
|
String gameId,
|
|
|
|
|
GameResult result,
|
|
|
|
|
EndReason endReason,
|
|
|
|
|
GameClock clock,
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL) String winnerId,
|
2026-10-17 02:00:44 +03:00
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL) String leftUserId,
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL) Series series) {
|
2026-10-16 11:09:16 +03:00
|
|
|
}
|