GameOutcometype
The terminal outcome; null means the run has no terminal outcome yet.
Import it
import type { GameOutcome } from "@johnmorrisdotca/houseki/gem-swap";
Definition
type GameOutcome = 'won' | 'lost' | 'finished' | null;
Examples
import { createGame } from "@johnmorrisdotca/houseki/gem-swap";
import type { GameOutcome } from "@johnmorrisdotca/houseki/gem-swap";
const state=createGame({seed:"docs"});
const value: GameOutcome = state.outcome;
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);nullWhat it prints (run when this page was built)