NewGameViewModel

constructor(scope: CoroutineScope, appState: AppStateImpl, globalError: ReversiException? = null, setGlobalError: (Exception?, ErrorType?) -> Unit, createGame: (Game) -> Unit)

Parameters

scope

Coroutine scope for background operations.

playerName

Current player name used when creating non-local games.

globalError

Optional global error propagated into initial UI state.

setGlobalError

Callback to update global error when present.

createGame

Callback invoked with the created game instance.