Update rooms.ts for numeric player IDs

- Changed Player.id from string to number
- Removed name field from Player interface
- Updated publicRoom to not expose name field
- Players are now identified by numeric IDs only
This commit is contained in:
2026-04-08 18:48:07 -05:00
parent f5af850cf3
commit 010b5a593e

View File

@@ -11,8 +11,7 @@ export interface RoomSettings {
} }
export interface Player { export interface Player {
id: string; id: number;
name: string;
teamIndex: number | null; teamIndex: number | null;
ws: ServerWebSocket<unknown> | null; ws: ServerWebSocket<unknown> | null;
isConnected: boolean; isConnected: boolean;
@@ -81,7 +80,6 @@ export function publicRoom(room: Room) {
}, },
players: Array.from(room.players.values()).map(p => ({ players: Array.from(room.players.values()).map(p => ({
id: p.id, id: p.id,
name: p.name,
teamIndex: p.teamIndex, teamIndex: p.teamIndex,
isConnected: p.isConnected, isConnected: p.isConnected,
})), })),