Reference · Cards, hands and piles
PileLayoutOptionstype
How a pile is laid out.
Import it
import type { PileLayoutOptions } from "@johnmorrisdotca/toranpu/element";
Also exported from: @johnmorrisdotca/toranpu/element/define
Definition
type PileLayoutOptions = {
messiness?: number;
seed?: number;
depth?: number;
};
Members
| Name | Type | Description |
|---|---|---|
messiness (optional) | number | undefined | From 0 (squared up neatly) to 1 (very messy). Unless said, 0.3. |
seed (optional) | number | undefined | The pile's own seed: the same seed always lays the same pile the same way. Unless said, 1. |
depth (optional) | number | undefined | How many cards under the top one are drawn at most, so a pile of fifty-two costs no more than one of ten. Unless said, 10. |
Examples
import type { PileLayoutOptions } from "@johnmorrisdotca/toranpu/element";
const value: PileLayoutOptions = { seed: 42, depth: 10, messiness: 0.5 };
console.log(value.seed);42What it prints (run when this page was built)