Battle State
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.
| Property | Type | Description |
| currentBattleInfo | StateFlow<BattleInfo?> | Current PK information |
| battleUsers | StateFlow<List<SeatUserInfo>> | PK user list |
| battleScore | StateFlow<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>>)