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