replace getPlayerLookup with getAllPlayerIds in room manager

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 15:14:28 +01:00
parent 4932b47833
commit d61d5dfa69

View File

@@ -148,14 +148,10 @@ export class RoomManager {
return room?.gameManager ?? null
}
getPlayerLookup(code: string): Map<string, string> {
getAllPlayerIds(code: string): string[] {
const room = this.rooms.get(code)
if (!room) return new Map()
const lookup = new Map<string, string>()
for (const player of room.players.values()) {
lookup.set(player.id, player.displayName)
}
return lookup
if (!room) return []
return Array.from(room.players.values()).map((p) => p.id)
}
getPlayerIdBySession(code: string, sessionId: string): string | null {