NewGameOptionstype
How to seat a new game. Everything but players has a sensible default.
Import it
import type { NewGameOptions } from "@johnmorrisdotca/toranpu";
Definition
type NewGameOptions = {
players: readonly string[];
size?: number;
seed?: number;
computers?: readonly boolean[];
};
Members
| Name | Type | Description |
|---|---|---|
players | readonly string[] | One name a seat. The number of names is the number of players. |
size (optional) | number | undefined | How long the game lasts, in its own terms ( |
seed (optional) | number | undefined | The seed every deal is shuffled from; a random one when left out. The same seed deals the same cards. |
computers (optional) | readonly boolean[] | undefined | One a seat: true where a computer plays. Seats not given are people's. |
Examples
import type { NewGameOptions } from "@johnmorrisdotca/toranpu";
const value: NewGameOptions = { players: ["Aki", "Ben", "Cy", "Dev"], seed: 42 };
console.log(value.seed);42What it prints (run when this page was built)