mwg API
    Preparing search index...

    Function scoreDice

    • Scores five d6 values against one Yahtzee category.

      Parameters

      Returns number

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

      console.log(scoreDice([4, 4, 4, 4, 4], 'yahtzee')); // 50
      console.log(scoreDice([1, 2, 3, 4, 5], 'chance')); // 15 - the sum of all five dice
      console.log(scoreDice([4, 4, 4, 4, 4], 'fours')); // 20 - five fours, four points each