replace getPlayerLookup with getAllPlayerIds in room manager
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user