Reference · Native shared-device player
GunjinMounttype
Public controls returned by mountGunjin; no authoritative state is exposed.
Import it
import type { GunjinMount } from "@johnmorrisdotca/gunjin/play";
Also exported from: @johnmorrisdotca/gunjin
Definition
type GunjinMount = {
view: () => ReturnType<typeof viewForPlayer>;
replay: () => string;
set: (options: MountOptions) => void;
destroy: () => void;
};
Members
| Name | Type | Description |
|---|---|---|
view | () => ReturnType<typeof viewForPlayer> | |
replay | () => string | |
set | (options: MountOptions) => void | |
destroy | () => void |
Examples
import { createHasamiMatch } from "@johnmorrisdotca/gunjin/hasami";
import type { GunjinMount } from "@johnmorrisdotca/gunjin/play";
import { mountGunjin } from "@johnmorrisdotca/gunjin/play";
const base=createHasamiMatch({width:7,height:7});
const host=document.createElement("div");
document.body.append(host);
const mounted: GunjinMount=mountGunjin(host,base,{language:"ja"});
console.log(mounted.view().phase);
mounted.destroy();