mancala/apps/backend/src/main/java/app/playmancala/model/ClientGame.java

23 lines
736 B
Java
Raw Normal View History

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