feat(rules): add game-specific metadata attachment and unify match metadata initialization
Added AttachGameMetadata to GameRules interface Implemented metadata setup for Battleship (phase + readiness flags) Implemented no-op metadata hook for TicTacToe Moved generic phase/ready metadata out of MatchInit Added game/mode metadata to match state Fixed json:"metadata" tag in MatchState
This commit is contained in:
@@ -21,6 +21,8 @@ type GameRules interface {
|
||||
// Assign symbols/colors/pieces at start.
|
||||
AssignPlayerSymbols(players []*structs.Player)
|
||||
|
||||
// Attach Game Metadata
|
||||
AttachGameMetadata(state *structs.MatchState)
|
||||
// Apply a move.
|
||||
// Returns: (changed, gameOver, winnerIndex)
|
||||
ApplyMove(
|
||||
|
||||
Reference in New Issue
Block a user