SessionStore

class SessionStore(context: Context, scope: CoroutineScope)

Persists at most one SavedSession — the last unfinished game — in app-private storage. Written atomically, like the stats file, so a kill mid-save can't corrupt it.

Constructors

Link copied to clipboard
constructor(context: Context, scope: CoroutineScope)

Properties

Link copied to clipboard
val saved: StateFlow<SavedSession?>

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
fun save(session: SavedSession)