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
|
||||
}
|
||||
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user