Reference · Rules, tiles and records
PartyGametype
A PASS-AND-PLAY KUMIMOJI: one bag, read as a line the way the solo game
reads it (TilePlay), and a hand and a table for each player.
Import it
import type { PartyGame } from "@johnmorrisdotca/kumimoji";
Definition
type PartyGame = {
settings: PartySettings;
bag: string;
returned: string;
taken: number;
players: readonly PartyPlayer[];
dealt: number;
turn: number;
turns: number;
out: readonly number[];
lastTurns: readonly number[] | null;
resigned: readonly number[];
resignRun: readonly number[];
ending: PartyEnding | null;
startTable: string;
traded: boolean;
passedBy: number | null;
};
Members
| Name | Type | Description |
|---|---|---|
settings | PartySettings | |
bag | string | The tiles in the order they come out. |
returned | string | Tiles traded back, in order; they come out after the bag. |
taken | number | How many tiles have been taken from |
players | readonly PartyPlayer[] | Up to eight; two to eight when dealt, and one or more after players leave ( |
dealt | number | How many the game was dealt to: the address's own |
turn | number | Whose turn it is, by place in |
turns | number | How many turns have been ended, and seats left: a turn's own number, so each one opens on a fresh view. |
out | readonly number[] | The players who went out, in the order they did; the first is the one who began the last round. |
lastTurns | readonly number[] | null | THE LAST ROUND: null until somebody goes out, then the players still to take their one last turn, in order. John, 2026-09-28: "once one person goes out the remaining players get one last move. That should make it fair." |
resigned | readonly number[] | The players who resigned, in the order they did: their turns are passed over from then on. |
resignRun | readonly number[] | The resignations since a player still in last pressed Done: who is tied if nobody is left standing. |
ending | PartyEnding | null | How the game ended ( |
startTable | string | The tiles on the table of the player whose turn it is when the turn began, in order ( |
traded | boolean | Whether the player whose turn it is has traded this turn. |
passedBy | number | null | Who played the turn before this one — pressed Done or resigned — or null before anybody has: whose table the pass screen opens on. |
Examples
import { startParty } from "@johnmorrisdotca/kumimoji";
import type { PartyGame } from "@johnmorrisdotca/kumimoji";
const settings = {size:3,level:"hard",seed:44,gameLength:"short",language:"english",doubleSet:false,diagonals:false,hints:false} as const;
const bag = "catdogsun";
const game = startParty(settings,bag,["Seat 1","Seat 2"]);
const value: PartyGame = game;
console.log(value);{
settings: {
size: 3,
level: 'hard',
seed: 44,
gameLength: 'short',
language: 'english',
doubleSet: false,
diagonals: false,
hints: false
},
bag: 'catdogsun',
returned: '',
taken: 6,
players: [
{ name: 'Seat 1', hand: [Array], tiles: Map(0) {} },
{ name: 'Seat 2', hand: [Array], tiles: Map(0) {} }
],
dealt: 2,
turn: 0,
turns: 0,
out: [],
lastTurns: null,
resigned: [],
resignRun: [],
ending: null,
startTable: '',
traded: false,
passedBy: null
}What it prints (run when this page was built)