new

open suspend override fun new(gameName: String, gameStateProvider: () -> GameState)

Creates a new game entry in storage.

Parameters

gameName

The unique name for the new game.

gameStateProvider

A factory function that produces the initial game state.

Throws

if a game with this name already exists.