### index.html

```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Card Bluff & Shoot - Multiplayer</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="container">
        <!-- Lobby Section -->
        <div id="lobbySection" class="section">
            <h2>Welcome to Card Bluff & Shoot</h2>
            <input type="text" id="usernameInput" placeholder="Enter your username">
            <button id="continueBtn">Continue</button>

            <div style="margin-top: 20px;">
                <button id="createRoomBtn">Create New Room</button>
                <div style="margin-top: 10px;">
                    <input type="text" id="roomIdInput" placeholder="Enter Room ID">
                    <button id="joinRoomBtn">Join Room</button>
                </div>
            </div>
        </div>

        <!-- Waiting Room Section -->
        <div id="waitingRoom" class="section" style="display: none;">
            <h3>Room: <span id="roomDisplay"></span></h3>
            <div id="playersList">
                <h4>Players in room:</h4>
                <!-- List of players will be appended here -->
            </div>
            <button id="startGameBtn" style="display: none;">Start Game</button>
        </div>

        <!-- Game Section -->
        <div id="gameSection" class="game-container">
            <div class="top-section" id="players"></div>

            <div class="middle-section">
                <div class="game-info">
                    <strong>Core Card:</strong> <span id="coreCard">-</span>
                </div>
                <div class="game-info">
                    <strong>Last Played:</strong> <span id="lastPlayed">None</span>
                </div>
                <!-- Central Card Table -->
                <div class="central-table" id="centralTable"></div>
            </div>

            <div class="bottom-section">
                <div class="player-hand" id="currentHand"></div>
                <div class="actions">
                    <button id="playButton" onclick="playSelectedCards()">Play Selected Cards</button>
                    <button id="callBluffButton" onclick="callBluff()" style="background: #f44336">Call Bluff</button>
                </div>
            </div>

            <div class="overlay" id="shootingOverlay">
                <h2>🎲 Russian Roulette Time! 🔫</h2>
                <button onclick="pullTrigger()" style="padding: 15px 30px; font-size: 1em;">Pull Trigger</button>
            </div>
        </div>

        <!-- Game Over Overlay -->
        <div class="shooting-overlay" id="gameOverOverlay">
            <h2>Game Over!</h2>
            <p id="gameOverText"></p>
            <button onclick="resetToLobby()">Return to Lobby</button>
        </div>
    </div>

    <script>
        let ws;
        let username;
        let roomId;
        let isCreator = false;
        let userHand = [];
        let gameState = null;

        // Connect to WebSocket server
        function connectWebSocket() {
            ws = new WebSocket('ws://localhost:3000');

            ws.onopen = () => {
                console.log('Connected to server');
            };

            ws.onmessage = (event) => {
                const data = JSON.parse(event.data);
                handleWebSocketMessage(data);
            };

            ws.onclose = () => {
                console.log('Disconnected from server');
                alert('Disconnected from server');
                resetToLobby();
            };
        }

        // Handle WebSocket messages
        function handleWebSocketMessage(data) {
            switch(data.type) {
                case 'ROOM_CREATED':
                    roomId = data.roomId;
                    document.getElementById('lobbySection').style.display = 'none';
                    document.getElementById('waitingRoom').style.display = 'block';
                    document.getElementById('roomDisplay').textContent = roomId;
                    isCreator = true;
                    document.getElementById('startGameBtn').style.display = 'block';
                    break;
                case 'PLAYER_JOINED':
                    updatePlayersList(data.players);
                    break;
                case 'PLAYER_LEFT':
                    updatePlayersList(data.players);
                    break;
                case 'NEW_CREATOR':
                    isCreator = false;
                    alert(`New room creator is: ${data.newCreator}`);
                    break;
                case 'GAME_STARTED':
                    gameState = data.gameState;
                    userHand = data.hand || [];
                    startGameUI(data.gameState);
                    break;
                case 'GAME_UPDATE':
                    gameState = data.gameState;
                    if (data.gameState.hand) {
                        userHand = data.gameState.hand;
                    }
                    updateGameUI();
                    break;
                case 'BLUFF_RESULT':
                    showBluffResult(data);
                    break;
                case 'SHOT_RESULT':
                    showShotResult(data);
                    break;
                case 'GAME_OVER':
                    showGameOver(data);
                    break;
                case 'ERROR':
                    alert(data.message);
                    break;
                default:
                    console.log('Unknown message type:', data.type);
            }
        }

        // Handle lobby continue button
        document.getElementById('continueBtn').addEventListener('click', () => {
            const input = document.getElementById('usernameInput').value.trim();
            if (input === '') {
                alert('Please enter a username.');
                return;
            }
            username = input;
            document.getElementById('usernameInput').disabled = true;
            document.getElementById('continueBtn').disabled = true;
            connectWebSocket();
        });

        // Handle create room
        document.getElementById('createRoomBtn').addEventListener('click', () => {
            if (!username) {
                alert('Please enter a username first.');
                return;
            }
            ws.send(JSON.stringify({
                type: 'CREATE_ROOM',
                username: username
            }));
        });

        // Handle join room
        document.getElementById('joinRoomBtn').addEventListener('click', () => {
            const inputRoomId = document.getElementById('roomIdInput').value.trim();
            if (inputRoomId === '') {
                alert('Please enter a Room ID.');
                return;
            }
            if (!username) {
                alert('Please enter a username first.');
                return;
            }
            ws.send(JSON.stringify({
                type: 'JOIN_ROOM',
                username: username,
                roomId: inputRoomId
            }));
            roomId = inputRoomId;
            document.getElementById('lobbySection').style.display = 'none';
            document.getElementById('waitingRoom').style.display = 'block';
        });

        // Handle start game
        document.getElementById('startGameBtn').addEventListener('click', () => {
            ws.send(JSON.stringify({
                type: 'START_GAME'
            }));
        });

        // Update players list in waiting room
        function updatePlayersList(players) {
            const list = document.getElementById('playersList');
            list.innerHTML = '<h4>Players in room:</h4>';
            players.forEach(player => {
                const div = document.createElement('div');
                div.className = 'player';
                div.textContent = player;
                list.appendChild(div);
            });

            // Show start button only to creator and if at least two players
            if (isCreator && players.length >=2 ) {
                document.getElementById('startGameBtn').style.display = 'block';
            } else {
                document.getElementById('startGameBtn').style.display = 'none';
            }
        }

        // Start Game UI
        function startGameUI(gameStateData) {
            document.getElementById('waitingRoom').style.display = 'none';
            document.getElementById('gameSection').style.display = 'grid';
            renderGame(gameStateData);
        }

        // Update Game UI
        function updateGameUI() {
            if (!gameState) return;
            renderGame(gameState);
        }

        // Render Game UI
        function renderGame(gameState) {
            // Render players
            const playersContainer = document.getElementById('players');
            playersContainer.innerHTML = '';
            gameState.players.forEach(player => {
                const playerEl = document.createElement('div');
                playerEl.className = `player ${player.username === gameState.currentPlayer ? 'active' : ''} ${player.isEliminated ? 'eliminated' : ''}`;
                playerEl.innerHTML = `
                    <strong>${player.username}${player.username === username ? ' (You)' : ''}</strong>
                    <div class="bullets">Bullets: ${player.bulletSlots}/6</div>
                `;
                playersContainer.appendChild(playerEl);
            });

            // Render core card
            const coreCardSpan = document.getElementById('coreCard');
            if (gameState.coreCard && gameState.coreCard !== '-') {
                coreCardSpan.innerHTML = formatCard(gameState.coreCard);
            } else {
                coreCardSpan.textContent = '-';
            }

            // Render last played
            const lastPlayedSpan = document.getElementById('lastPlayed');
            if (gameState.lastPlayedCount > 0) {
                lastPlayedSpan.textContent = `${gameState.lastPlayedCount} card(s) played`;
            } else {
                lastPlayedSpan.textContent = 'None';
            }

            // Render central table
            const centralTable = document.getElementById('centralTable');
            centralTable.innerHTML = '';
            gameState.centralTableCards.forEach(cardObj => {
                const cardEl = document.createElement('div');
                cardEl.className = `card ${cardObj.revealed ? getSuitClass(cardObj.card) : 'back'}`;
                if (cardObj.revealed) {
                    cardEl.innerHTML = formatCard(cardObj.card);
                    cardEl.style.color = getCardColor(cardObj.card);
                } else {
                    cardEl.innerHTML = '🂠';
                }
                centralTable.appendChild(cardEl);
            });

            // Render current player's hand
            const currentPlayerName = gameState.currentPlayer;
            if (currentPlayerName === username && !gameState.isGameOver) {
                const handContainer = document.getElementById('currentHand');
                handContainer.innerHTML = '';
                userHand.forEach((card, index) => {
                    const cardEl = document.createElement('div');
                    cardEl.className = `card ${getSuitClass(card)}`;
                    cardEl.style.color = getCardColor(card);
                    cardEl.dataset.index = index;
                    cardEl.innerHTML = card;
                    cardEl.onclick = () => {
                        cardEl.classList.toggle('selected');
                    };
                    handContainer.appendChild(cardEl);
                });
            } else {
                // Not your turn, show placeholder or number of cards
                const handContainer = document.getElementById('currentHand');
                if (username === currentPlayerName) {
                    handContainer.innerHTML = 'It\'s your turn!';
                } else {
                    const player = gameState.players.find(p => p.username === currentPlayerName);
                    handContainer.innerHTML = `It's ${player.username}'s turn.`;
                }
            }

            // Enable/Disable action buttons based on turn
            if (gameState.currentPlayer === username && !gameState.isGameOver) {
                document.getElementById('playButton').disabled = (userHand.length === 0);
                document.getElementById('callBluffButton').disabled = (gameState.lastPlayedCount === 0);
            } else {
                document.getElementById('playButton').disabled = true;
                document.getElementById('callBluffButton').disabled = true;
            }
        }

        // Format card HTML
        function formatCard(cardStr) {
            const color = getCardColor(cardStr);
            return `<span style="color: ${color};">${cardStr}</span>`;
        }

        // Get card color based on suit
        function getCardColor(cardStr) {
            const suit = cardStr.slice(-1);
            return (suit === '♥' || suit === '♦') ? 'red' : 'black';
        }

        // Get suit class for styling
        function getSuitClass(cardStr) {
            const suit = cardStr.slice(-1);
            return suit === '♠' ? 'spades' :
                   suit === '♣' ? 'clubs' :
                   suit === '♥' ? 'hearts' :
                   'diamonds';
        }

        // Play selected cards
        function playSelectedCards() {
            // Get selected cards
            const selectedCards = Array.from(document.querySelectorAll('.card.selected'));
            if (selectedCards.length === 0) {
                alert('Please select at least one card to play.');
                return;
            }

            const selectedIndices = selectedCards.map(card => parseInt(card.dataset.index));

            // Send PLAY_CARDS message to server
            ws.send(JSON.stringify({
                type: 'PLAY_CARDS',
                selectedIndices: selectedIndices
            }));

            // Remove selected cards from userHand
            selectedIndices.sort((a, b) => b - a); // remove from higher index to avoid shifting
            selectedIndices.forEach(index => {
                userHand.splice(index, 1);
            });

            // Clear selected classes
            selectedCards.forEach(card => {
                card.classList.remove('selected');
            });
        }

        // Call bluff
        function callBluff() {
            // Send CALL_BLUFF message to server
            ws.send(JSON.stringify({
                type: 'CALL_BLUFF'
            }));
        }

        // Pull trigger
        function pullTrigger() {
            // Send PULL_TRIGGER message to server
            ws.send(JSON.stringify({
                type: 'PULL_TRIGGER'
            }));

            // Hide shooting overlay
            document.getElementById('shootingOverlay').style.display = 'none';
        }

        // Show bluff result
        function showBluffResult(data) {
            if (data.result === 'PLAYER_BLUFFED') {
                alert(`${data.player} was bluffing and has ${data.bulletSlots} bullet slot(s) left.${data.isEliminated ? ' They have been eliminated!' : ''}`);
            } else if (data.result === 'PLAYER_NOT_BLUFFED') {
                alert(`${data.player} was not bluffing and has ${data.bulletSlots} bullet slot(s) left.${data.isEliminated ? ' They have been eliminated!' : ''}`);
            }

            // After bluff result, reset last played cards display
            gameState.lastPlayedCount = 0;
            document.getElementById('lastPlayed').textContent = 'None';
        }

        // Show shot result
        function showShotResult(data) {
            if (data.result === 'SHOT') {
                alert(`${data.player} has been shot and eliminated!`);
            } else if (data.result === 'SURVIVED') {
                alert(`${data.player} survived the shot.`);
            }

            // After shot result, the server would have updated the game state
        }

        // Show game over
        function showGameOver(data) {
            document.getElementById('gameSection').style.display = 'none';
            document.getElementById('gameOverOverlay').style.display = 'flex';
            document.getElementById('gameOverText').textContent = `Winner: ${data.winner}`;
        }

        // Reset to lobby
        function resetToLobby() {
            document.getElementById('gameSection').style.display = 'none';
            document.getElementById('gameOverOverlay').style.display = 'none';
            document.getElementById('waitingRoom').style.display = 'none';
            document.getElementById('lobbySection').style.display = 'block';
            // Reset variables
            roomId = null;
            isCreator = false;
            gameState = null;
            userHand = [];
            // Reconnect WebSocket if not connected
            if (ws && ws.readyState !== WebSocket.OPEN) {
                connectWebSocket();
            }
        }
    </script>
</body>
</html>
```

### server.js

```javascript
// server.js

const express = require('express');
const http = require('http');
const WebSocket = require('ws');
const { v4: uuidv4 } = require('uuid');

// Define Game Classes
class Card {
    constructor(value, suit) {
        this.value = value;
        this.suit = suit; // '♠', '♥', '♦', '♣'
    }

    toString() {
        return `${this.value}${this.suit}`;
    }

    getSuitClass() {
        switch (this.suit) {
            case '♠':
                return 'spades';
            case '♥':
                return 'hearts';
            case '♦':
                return 'diamonds';
            case '♣':
                return 'clubs';
            default:
                return '';
        }
    }

    getColor() {
        return (this.suit === '♥' || this.suit === '♦') ? 'red' : 'black';
    }
}

class Player {
    constructor(id, username, ws) {
        this.id = id;
        this.username = username;
        this.ws = ws;
        this.hand = [];
        this.bulletSlots = 6;
        this.isEliminated = false;
    }
}

class Game {
    constructor(roomId, players) {
        this.roomId = roomId;
        this.players = players; // Array of Player objects
        this.currentPlayerIndex = 0;
        this.coreCard = null;
        this.lastPlayedCards = [];
        this.deck = [];
        this.isGameOver = false;
        this.centralTableCards = [];
        this.shootingPlayer = null; // Player object
        this.initializeDeck();
        this.shuffleDeck();
        this.dealCards();
    }

    initializeDeck() {
        const values = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A'];
        const suits = ['♠', '♥', '♦', '♣'];
        this.deck = [];
        for (let value of values) {
            for (let suit of suits) {
                this.deck.push(new Card(value, suit));
            }
        }
    }

    shuffleDeck() {
        for (let i = this.deck.length - 1; i > 0; i--) {
            const j = Math.floor(Math.random() * (i + 1));
            [this.deck[i], this.deck[j]] = [this.deck[j], this.deck[i]];
        }
    }

    dealCards() {
        // Assign a core card
        this.coreCard = this.deck.shift();

        // Deal 5 cards to each player
        this.players.forEach(player => {
            for (let i = 0; i < 5; i++) {
                if (this.deck.length > 0) {
                    player.hand.push(this.deck.shift());
                }
            }
        });
    }

    getCurrentPlayer() {
        return this.players[this.currentPlayerIndex];
    }

    nextPlayer() {
        if (this.isGameOver) return;
        let attempts = 0;
        do {
            this.currentPlayerIndex = (this.currentPlayerIndex + 1) % this.players.length;
            attempts++;
            if (attempts > this.players.length) break; // prevent infinite loop
        } while (this.getCurrentPlayer().isEliminated);
    }

    getGameState(requestingPlayerId) {
        return {
            roomId: this.roomId,
            players: this.players.map(player => ({
                id: player.id,
                username: player.username,
                isEliminated: player.isEliminated,
                bulletSlots: player.bulletSlots,
                // Only send hand to the requesting player
                hand: player.id === requestingPlayerId ? player.hand.map(card => card.toString()) : undefined
            })),
            currentPlayer: this.getCurrentPlayer().username,
            coreCard: this.coreCard ? this.coreCard.toString() : '-',
            lastPlayedCount: this.lastPlayedCards.length, // Only send count, not actual cards
            centralTableCards: this.centralTableCards.map(cardObj => ({
                card: cardObj.card.toString(),
                revealed: cardObj.revealed
            })),
            isGameOver: this.isGameOver
        };
    }
}

// Initialize Express server
const app = express();
const server = http.createServer(app);
const wss = new WebSocket.Server({ server });

// Serve static files from 'public' directory
app.use(express.static('public'));

// Data structures to manage rooms and games
const rooms = {}; // roomId => {id, creator, players: [Player], isStarted}
const games = {}; // roomId => Game

// Handle WebSocket connections
wss.on('connection', (ws) => {
    ws.id = uuidv4(); // Assign a unique ID to each connection

    ws.on('message', (message) => {
        let data;
        try {
            data = JSON.parse(message);
        } catch (e) {
            ws.send(JSON.stringify({ type: 'ERROR', message: 'Invalid JSON' }));
            return;
        }

        switch (data.type) {
            case 'CREATE_ROOM':
                handleCreateRoom(ws, data);
                break;
            case 'JOIN_ROOM':
                handleJoinRoom(ws, data);
                break;
            case 'START_GAME':
                handleStartGame(ws, data);
                break;
            case 'PLAY_CARDS':
                handlePlayCards(ws, data);
                break;
            case 'CALL_BLUFF':
                handleCallBluff(ws, data);
                break;
            case 'PULL_TRIGGER':
                handlePullTrigger(ws, data);
                break;
            default:
                ws.send(JSON.stringify({ type: 'ERROR', message: 'Unknown command' }));
        }
    });

    ws.on('close', () => {
        handleDisconnect(ws);
    });
});

// Handle creating a room
function handleCreateRoom(ws, data) {
    const username = data.username;
    if (!username) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Username is required to create a room' }));
        return;
    }

    const roomId = generateRoomId();
    const playerId = uuidv4();
    const player = new Player(playerId, username, ws);

    rooms[roomId] = {
        id: roomId,
        creator: playerId,
        players: [player],
        isStarted: false
    };

    ws.roomId = roomId;
    ws.playerId = playerId;

    ws.send(JSON.stringify({ type: 'ROOM_CREATED', roomId: roomId }));

    // Broadcast to room (only creator for now)
    ws.send(JSON.stringify({ type: 'PLAYER_JOINED', players: rooms[roomId].players.map(p => p.username) }));
}

// Handle joining a room
function handleJoinRoom(ws, data) {
    const username = data.username;
    const roomId = data.roomId;
    if (!username || !roomId) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Username and Room ID are required to join a room' }));
        return;
    }

    const room = rooms[roomId];
    if (!room) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Room not found' }));
        return;
    }

    if (room.isStarted) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Game already started in this room' }));
        return;
    }

    if (room.players.length >= 5) { // Assuming max 5 players
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Room is full' }));
        return;
    }

    const playerId = uuidv4();
    const player = new Player(playerId, username, ws);
    room.players.push(player);

    ws.roomId = roomId;
    ws.playerId = playerId;

    // Notify all players in the room about the new player
    broadcastToRoom(roomId, {
        type: 'PLAYER_JOINED',
        players: room.players.map(p => p.username)
    });
}

// Handle starting the game
function handleStartGame(ws, data) {
    const roomId = ws.roomId;
    const playerId = ws.playerId;
    if (!roomId || !rooms[roomId]) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Room not found' }));
        return;
    }

    const room = rooms[roomId];
    if (room.creator !== playerId) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Only the room creator can start the game' }));
        return;
    }

    if (room.isStarted) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Game already started' }));
        return;
    }

    room.isStarted = true;

    // Initialize game
    games[roomId] = new Game(roomId, room.players);

    // Broadcast game start and initial game state to all players
    const game = games[roomId];
    room.players.forEach(player => {
        player.ws.send(JSON.stringify({
            type: 'GAME_STARTED',
            gameState: game.getGameState(player.id),
            hand: player.hand.map(card => card.toString())
        }));
    });
}

// Handle playing cards
function handlePlayCards(ws, data) {
    const roomId = ws.roomId;
    const playerId = ws.playerId;
    const selectedIndices = data.selectedIndices; // Array of indices

    if (!roomId || !games[roomId]) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Game not found' }));
        return;
    }

    const game = games[roomId];
    if (game.isGameOver) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Game is over' }));
        return;
    }

    const player = game.players.find(p => p.id === playerId);
    if (!player) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Player not found in the game' }));
        return;
    }

    if (game.getCurrentPlayer().id !== playerId) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Not your turn' }));
        return;
    }

    if (!Array.isArray(selectedIndices) || selectedIndices.length === 0) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'No cards selected' }));
        return;
    }

    // Validate selected indices
    if (selectedIndices.some(index => index < 0 || index >= player.hand.length)) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Invalid card indices' }));
        return;
    }

    // Get selected cards
    const selectedCards = selectedIndices.map(index => player.hand[index]);

    // Remove selected cards from player's hand (reverse sort to remove from higher index to lower)
    selectedIndices.sort((a, b) => b - a);
    selectedIndices.forEach(index => {
        player.hand.splice(index, 1);
    });

    game.lastPlayedCards = selectedCards;

    // Add to central table as face-down
    selectedCards.forEach(card => {
        game.centralTableCards.push({
            card: card,
            revealed: false
        });
    });

    // Broadcast game state to all players
    broadcastGameState(roomId);

    // Move to next player
    game.nextPlayer();

    // Broadcast updated game state after moving the turn
    broadcastGameState(roomId);
}

// Handle calling bluff
function handleCallBluff(ws, data) {
    const roomId = ws.roomId;
    const playerId = ws.playerId;

    if (!roomId || !games[roomId]) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Game not found' }));
        return;
    }

    const game = games[roomId];
    if (game.isGameOver) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Game is over' }));
        return;
    }

    const caller = game.players.find(p => p.id === playerId);
    if (!caller) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Player not found in the game' }));
        return;
    }

    // Cannot call bluff if no one has played yet
    if (game.lastPlayedCards.length === 0) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'No cards have been played yet' }));
        return;
    }

    // Determine if the last played cards are a bluff
    // Assuming in this game, players must play the coreCard value
    const actual = game.lastPlayedCards.every(card => card.value === game.coreCard.value);

    if (!actual) {
        // Bluff was called, and player who played the last cards was bluffing
        // The previous player loses one bullet slot and might get eliminated

        // Identify the player who played last
        const lastPlayerIndex = (game.currentPlayerIndex - 1 + game.players.length) % game.players.length;
        const lastPlayer = game.players[lastPlayerIndex];

        lastPlayer.bulletSlots -= 1;

        // Check if player is eliminated
        if (lastPlayer.bulletSlots <= 0) {
            lastPlayer.isEliminated = true;
        }

        // Notify all players about the result
        broadcastToRoom(roomId, {
            type: 'BLUFF_RESULT',
            result: 'PLAYER_BLUFFED',
            player: lastPlayer.username,
            bulletSlots: lastPlayer.bulletSlots,
            isEliminated: lastPlayer.isEliminated
        });

        // Remove the last played cards from the central table
        game.lastPlayedCards = [];
        game.centralTableCards = [];

        // Check if game is over
        const remainingPlayers = game.players.filter(p => !p.isEliminated);
        if (remainingPlayers.length === 1) {
            game.isGameOver = true;
            broadcastToRoom(roomId, {
                type: 'GAME_OVER',
                winner: remainingPlayers[0].username
            });
            delete games[roomId];
            return;
        }

    } else {
        // Bluff called, but it was not a bluff
        // The caller loses one bullet slot and might get eliminated
        caller.bulletSlots -= 1;

        // Notify all players about the result
        broadcastToRoom(roomId, {
            type: 'BLUFF_RESULT',
            result: 'PLAYER_NOT_BLUFFED',
            player: caller.username,
            bulletSlots: caller.bulletSlots,
            isEliminated: caller.bulletSlots <= 0
        });

        if (caller.bulletSlots <= 0) {
            caller.isEliminated = true;
        }

        // Remove the last played cards from the central table
        game.lastPlayedCards = [];
        game.centralTableCards = [];

        // Check if game is over
        const remainingPlayers = game.players.filter(p => !p.isEliminated);
        if (remainingPlayers.length === 1) {
            game.isGameOver = true;
            broadcastToRoom(roomId, {
                type: 'GAME_OVER',
                winner: remainingPlayers[0].username
            });
            delete games[roomId];
            return;
        }
    }

    // Broadcast updated game state
    broadcastGameState(roomId);
}

// Handle pulling trigger
function handlePullTrigger(ws, data) {
    const roomId = ws.roomId;
    const playerId = ws.playerId;

    if (!roomId || !games[roomId]) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Game not found' }));
        return;
    }

    const game = games[roomId];
    if (game.isGameOver) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'Game is over' }));
        return;
    }

    if (!game.shootingPlayer) {
        ws.send(JSON.stringify({ type: 'ERROR', message: 'No shooting player set' }));
        return;
    }

    const shootingPlayer = game.shootingPlayer;

    // Pull the trigger: determine if the player is shot
    const bulletChance = 1 / shootingPlayer.bulletSlots;
    const shot = Math.random() < bulletChance;

    if (shot) {
        shootingPlayer.bulletSlots -= 1;
        shootingPlayer.isEliminated = true;

        broadcastToRoom(roomId, {
            type: 'SHOT_RESULT',
            result: 'SHOT',
            player: shootingPlayer.username,
            bulletSlots: shootingPlayer.bulletSlots,
            isEliminated: shootingPlayer.isEliminated
        });
    } else {
        shootingPlayer.bulletSlots -= 1;

        broadcastToRoom(roomId, {
            type: 'SHOT_RESULT',
            result: 'SURVIVED',
            player: shootingPlayer.username,
            bulletSlots: shootingPlayer.bulletSlots,
            isEliminated: shootingPlayer.isEliminated
        });
    }

    // Check if game is over
    const remainingPlayers = game.players.filter(p => !p.isEliminated);
    if (remainingPlayers.length === 1) {
        game.isGameOver = true;
        broadcastToRoom(roomId, {
            type: 'GAME_OVER',
            winner: remainingPlayers[0].username
        });
        delete games[roomId];
        return;
    }

    // Reset for next round
    game.lastPlayedCards = [];
    game.centralTableCards = [];
    game.coreCard = null;

    // Move to next player
    game.nextPlayer();

    // Broadcast updated game state
    broadcastGameState(roomId);
}

// Handle disconnects
function handleDisconnect(ws) {
    const roomId = ws.roomId;
    const playerId = ws.playerId;

    if (!roomId || !rooms[roomId]) return;

    const room = rooms[roomId];
    const playerIndex = room.players.findIndex(p => p.id === playerId);
    if (playerIndex === -1) return;

    const player = room.players.splice(playerIndex, 1)[0];

    // Notify remaining players
    broadcastToRoom(roomId, {
        type: 'PLAYER_LEFT',
        players: room.players.map(p => p.username)
    });

    // If game is ongoing, mark player as eliminated
    if (games[roomId]) {
        const game = games[roomId];
        const gamePlayer = game.players.find(p => p.id === playerId);
        if (gamePlayer) {
            gamePlayer.isEliminated = true;

            // Check for game over
            const remainingPlayers = game.players.filter(p => !p.isEliminated);
            if (remainingPlayers.length === 1) {
                game.isGameOver = true;
                broadcastToRoom(roomId, {
                    type: 'GAME_OVER',
                    winner: remainingPlayers[0].username
                });
                delete games[roomId];
                return;
            }

            // Broadcast updated game state
            broadcastGameState(roomId);
        }
    }

    // If room is empty, delete it
    if (room.players.length === 0) {
        delete rooms[roomId];
    } else {
        // If creator disconnected, assign a new creator
        if (room.creator === playerId) {
            room.creator = room.players[0].id;
            // Notify players about new creator
            broadcastToRoom(roomId, {
                type: 'NEW_CREATOR',
                newCreator: room.players[0].username
            });
        }
    }
}

// Generate a unique room ID
function generateRoomId() {
    return Math.random().toString(36).substr(2, 6).toUpperCase();
}

// Broadcast game state to all players in the room
function broadcastGameState(roomId) {
    const game = games[roomId];
    if (!game) return;

    const room = rooms[roomId];
    if (!room) return;

    room.players.forEach(player => {
        player.ws.send(JSON.stringify({
            type: 'GAME_UPDATE',
            gameState: game.getGameState(player.id)
        }));
    });
}

// Broadcast a message to all players in a room
function broadcastToRoom(roomId, message) {
    const room = rooms[roomId];
    if (!room) return;

    room.players.forEach(player => {
        if (player.ws.readyState === WebSocket.OPEN) {
            player.ws.send(JSON.stringify(message));
        }
    });
}

const PORT = process.env.PORT || 3000;

server.listen(PORT, () => {
    console.log(`Server is listening on port ${PORT}`);
});
```

Your task it's a single one, remove the user registration and room's creation / joining... The server it's going to hard write the ID for a unique room, and for each user that loads the page, automatically joins to the room with a random name. And the match start when one of the user's click on start match, otherwise, for reset would be a button that allow reset the room and allow new users to join in.

Consider the reason behind this it's for WIP, don't assume this is the final work. Be efficient with the code, be accurate. Output both files updated.