mwg API
    Preparing search index...

    Function dealSolitaire

    • A Klondike-shaped deal: seven tableau columns, each with one face-up card on a run of face-down ones, the rest in the stock.

      Parameters

      • Optionalseed: number

      Returns SolitaireState

      import { dealSolitaire } from '@datamoc/mw_games/board';

      const state = dealSolitaire(1); // seeded, for a reproducible deal
      console.log(state.stock.length); // 24 - 52 minus the 28 dealt across the tableau
      console.log(state.tableau[0].up); // [{ suit: 'clubs', rank: 12 }] - one face-up card to start