Skip to the content

Houseki宝石

Run five native gem and stone engines, play measured challenges and lessons, and save deterministic games.

Houseki (宝石) is Japanese for a gem or precious stone. About the name

Contents

Reference · Falling Triplets

seedStatefunction

Hashes a string seed with UTF-8 FNV-1a and returns a nonzero uint32 state.

Import it

import { seedState } from "@johnmorrisdotca/houseki/falling-triplets";

Definition

function seedState(seed: string): number

Parameters

NameTypeDescription
seedstring

A string seed hashed into a nonzero deterministic random state.

Returns

number

Hashes a string seed with UTF-8 FNV-1a and returns a nonzero uint32 state.

Examples

import { seedState } from "@johnmorrisdotca/houseki/falling-triplets";

console.log(seedState("docs"));
686503122

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/houseki 0.4.2.