本文へ移動

Kotoba言葉

必要な単語一覧だけを読み込み、重複する文字を正しく判定し、日替わりやシード付きの単語ゲームを遊べます。

「Kotoba」は「言葉」です。 名前について(英語)

目次

リファレンス · 判定・得点・ゲームのルール

KEYBOARD_ROWS定数

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

THE PHYSICAL KEYBOARD DRAWN UNDER A GOMOJI GRID, by language: QWERTY for English, AZERTY for French (the same 26 plain letters English's keys carry, arranged the way a French keyboard is), and QWERTZ for German, with Ä, Ö and Ü carried as keys of their own — German's letters, not English's plus a fold. All three are three rows, so WordKeyboard's Enter and Backspace, fixed to the last row, sit right whichever is drawn.

インポート

import { KEYBOARD_ROWS } from "@johnmorrisdotca/kotoba";

定義

const KEYBOARD_ROWS: Record<GomojiLanguage, readonly string[]> = {
    en: ["qwertyuiop", "asdfghjkl", "zxcvbnm"],
    fr: ["azertyuiop", "qsdfghjklm", "wxcvbn"],
    de: ["qwertzuiopü", "asdfghjklöä", "yxcvbnm"],
    pop: ["qwertyuiop", "asdfghjkl", "zxcvbnm"],
}

メンバー

名前型説明
enreadonly string[]
frreadonly string[]
dereadonly string[]
popreadonly string[]

例

import { KEYBOARD_ROWS } from "@johnmorrisdotca/kotoba";
console.log(KEYBOARD_ROWS);
{
  en: [ 'qwertyuiop', 'asdfghjkl', 'zxcvbnm' ],
  fr: [ 'azertyuiop', 'qsdfghjklm', 'wxcvbn' ],
  de: [ 'qwertzuiopü', 'asdfghjklöä', 'yxcvbnm' ],
  pop: [ 'qwertyuiop', 'asdfghjkl', 'zxcvbnm' ]
}

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

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

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