1.2.2 • Published 1 year ago

@artie-owlet/intransitive-dice v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

intransitive-dice

CI Coverage Lint

Tool for generating intransitive dice.


Install

npm install @artie-owlet/intransitive-dice

Usage

import { generate } from '@artie-owlet/intransitive-dice';

const itd = generate(4, 6, 24);
console.log(itd);
/* will output:
[
  [ 10, 11, 12, 13, 14, 15 ],
  [ 1, 2, 16, 17, 18, 19 ],
  [ 3, 4, 5, 20, 21, 22 ],
  [ 6, 7, 8, 9, 23, 24 ]
]
*/

API

generate(diceNum: number, sidesNum: number, win: number): number

  • diceNum - number of dice;
  • sidesNum - number of faces of each die;
  • win - sets the probability of winning by the formula p = win / (sidesNum ^ 2).
1.2.2

1 year ago

1.1.0

2 years ago

1.2.1

2 years ago

1.0.1

2 years ago

1.0.0

3 years ago