2026-10-16 11:09:16 +03:00
|
|
|
package app.playmancala.model;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
2026-10-17 02:00:44 +03:00
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
|
|
|
2026-10-16 11:09:16 +03:00
|
|
|
import app.playmancala.engine.MancalaGame;
|
|
|
|
|
|
|
|
|
|
// A live game as players and spectators receive it; leaves out spectator ids and other server-side state.
|
2026-10-17 02:00:44 +03:00
|
|
|
// It refers to the live MancalaGame, so serialise it on the game loop. `series` holds the games before this one.
|
2026-10-16 11:09:16 +03:00
|
|
|
public record ClientGame(
|
|
|
|
|
String id,
|
|
|
|
|
MancalaGame mancalaGame,
|
|
|
|
|
GameUsersConnectionInfo gameUsersConnectionInfo,
|
|
|
|
|
long startedAt,
|
|
|
|
|
List<Long> moveTimes,
|
|
|
|
|
int spectatorCount,
|
|
|
|
|
GameClock clock,
|
2026-10-17 02:00:44 +03:00
|
|
|
long serverTime,
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL) Series series,
|
|
|
|
|
Seat firstSeat) {
|
2026-10-16 11:09:16 +03:00
|
|
|
}
|