本文へ移動

Kyuubuキューブ

CSS 3Dのキューブをタッチ、キー、回転記号で回します。シードでスクランブルを再現し、名前付きの手順で解き方を追えます。

「キューブ」は、英語のcubeを表す日本語の表記です。 名前について(英語)

目次

リファレンス · キューブのエンジンと表示

CliSurroundings型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

What the command line is told about where it runs. All of it may be left out.

インポート

import type { CliSurroundings } from "@johnmorrisdotca/kyuubu";

定義

type CliSurroundings = {
    env?: Readonly<Record<string, string | undefined>>;
    stdin?: string;
    colour?: boolean;
    locale?: string;
    random?: () => number;
};

メンバー

名前型説明
env (省略可)Readonly<Record<string, string | undefined>> | undefined

The environment: LC_ALL, LC_MESSAGES and LANG choose the language, and NO_COLOR turns colour off.

stdin (省略可)string | undefined

What was piped in, for --stdin.

colour (省略可)boolean | undefined

Whether standard output is a terminal that shows colour. Piped output is never coloured.

locale (省略可)string | undefined

The system's language, used where the environment names none (Windows).

random (省略可)(() => number) | undefined

Where unseeded scrambles come from: a number in [0, 1), Math.random when left out.

例

import type { CliSurroundings } from "@johnmorrisdotca/kyuubu";
import { seededRandom } from "@johnmorrisdotca/kyuubu";

const value: CliSurroundings = { env: {}, locale: "en", colour: false, random: seededRandom("docs") };
console.log(value.locale);
en

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/kyuubu 1.14.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。