BattleState

data class BattleState(var currentBattleInfo: StateFlow<BattleInfo?>, var battleUsers: StateFlow<List<SeatUserInfo>>, var battleScore: StateFlow<Map<String, Int>>)

PK-related state data provided by BattleStore

Overview

A comprehensive snapshot of the current PK session state. This structure contains all relevant information about current PK information, participating users, and scores.

PropertyTypeDescription
currentBattleInfoStateFlow<BattleInfo?>Current PK information
battleUsersStateFlow<List<SeatUserInfo>>PK user list
battleScoreStateFlow<Map<String, Int>>PK score mapping

Note: State is automatically updated when PK starts/ends, users join/exit PK, or scores are updated. Subscribe to battleState to receive real-time updates.

Constructors

Link copied to clipboard
constructor(currentBattleInfo: StateFlow<BattleInfo?>, battleUsers: StateFlow<List<SeatUserInfo>>, battleScore: StateFlow<Map<String, Int>>)

Properties

Link copied to clipboard
var battleScore: StateFlow<Map<String, Int>>

PK score mapping.

Link copied to clipboard
var battleUsers: StateFlow<List<SeatUserInfo>>

PK user list.

Link copied to clipboard
var currentBattleInfo: StateFlow<BattleInfo?>

Current PK information.