add getPlayerDisplayNames to RoomManager
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -154,6 +154,16 @@ export class RoomManager {
|
||||
return Array.from(room.players.values()).map((p) => p.id)
|
||||
}
|
||||
|
||||
getPlayerDisplayNames(code: string): Record<string, string> {
|
||||
const room = this.rooms.get(code)
|
||||
if (!room) return {}
|
||||
const result: Record<string, string> = {}
|
||||
for (const player of room.players.values()) {
|
||||
result[player.id] = player.displayName
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
getPlayerIdBySession(code: string, sessionId: string): string | null {
|
||||
const room = this.rooms.get(code)
|
||||
if (!room) return null
|
||||
|
||||
Reference in New Issue
Block a user