cloakfall
    Preparing search index...

    Function redactGameBody

    • A whole screen's worth of game state, redacted for one viewer - the boards wrapper's own children replaced with redactGameState's result, and (for a remote game) the global ordering panel's own Random/Set order controls disabled for anyone but the host - players[0] is always the room's host for as long as any game of theirs is running (the host is always the first to join a room, and the whole room closes if they ever leave, so this holds without needing to thread a separate host id through here). The final-score screen's own Play Again button is left exactly as sent - any player may click it, since all it ever does for its own clicker is show the room's own waiting room again, nothing that needs a host check. Everything else (the robots-only show-all-ships control, if present) is kept as is, since none of it carries anything secret. This is what a remote client actually renders and interacts with: the exact same markup local play already uses, inflated from this instead of built fresh.

      While placement is actively running (remotePlacementStage(body) === 'placing'), only viewer's own player is sent at all (see applyPlacingView) - nobody else's board, panel or deadline reaches this viewer's screen during placement. Every other stage (choosing/ordering/shuffling/chosen) still includes and shows everyone, same as today - the host needs to see and click every player's board to set the order. Once placement is over entirely (stage is null), applyPlayerView marks each player's role for this viewer, so the client's own CSS can style a summary player plainer.

      Parameters

      Returns DomItem