cloakfall
    Preparing search index...

    Function startNewGame

    • Build the players, place their ships, and start the round. Shared by beginRound (reading these settings from the lobby form) and playAgain (reading them from the settings the last game was started with) - either way, this is the one place a round actually begins. A remote game passes startRemotePlacement (simultaneous per-player placement, no handoff) in place of the default, and onPlayersBuilt to set each player's real name before anything is ever rendered or pushed - see server/gameplay.ts. Local play needs neither: a human types their own name during their own handoff screen (see placement.ts's nameInput), since there is nothing to know upfront.

      Parameters

      • parent: DomItemRoot
      • humans: number
      • robots: number
      • firstGoesFirst: boolean
      • hints: HintSetting
      • placementStarter: (players: Player[], body: DomItem, done: (order: Player[]) => void) => void = startPlacement
          • (players: Player[], body: DomItem, done: (order: Player[]) => void): void
          • Show the panel and start with the first human's handoff. done runs once the round is ready to start, with the order the players will take turns in. With several players that order is chosen here; otherwise it is the seat order.

            Parameters

            • players: Player[]
            • body: DomItem
            • done: (order: Player[]) => void

            Returns void

      • onPlayersBuilt: (players: Player[]) => void = ...

      Returns void