diff --git a/frontend/src/ts/test/funbox/funbox-functions.ts b/frontend/src/ts/test/funbox/funbox-functions.ts index 9020ac879636..200ec992f3cf 100644 --- a/frontend/src/ts/test/funbox/funbox-functions.ts +++ b/frontend/src/ts/test/funbox/funbox-functions.ts @@ -564,6 +564,15 @@ const list: Partial> = { else return ""; }, }, + lefthand: { + async withWords(words?: string[]): Promise { + const LEFT_HAND_KEYS = new Set("qwertasdfgzxcvb"); + const filtered = (words ?? []).filter((w) => + [...w.toLowerCase()].every((ch) => LEFT_HAND_KEYS.has(ch)), + ); + return new Wordset(filtered.length > 0 ? filtered : ["test"]); + }, + }, pseudolang: { async withWords(words?: string[]): Promise { if (words !== undefined) return new PseudolangWordGenerator(words); diff --git a/packages/funbox/src/list.ts b/packages/funbox/src/list.ts index c3dc3b72bddf..35c34bed0355 100644 --- a/packages/funbox/src/list.ts +++ b/packages/funbox/src/list.ts @@ -323,6 +323,14 @@ const list: Record = { frontendFunctions: ["getWord"], name: "weakspot", }, + lefthand: { + description: "Only words typeable with the left hand.", + canGetPb: false, + difficultyLevel: 1, + properties: ["changesWordsFrequency"], + frontendFunctions: ["withWords"], + name: "lefthand", + }, pseudolang: { description: "Nonsense words that look like the current language.", canGetPb: false, diff --git a/packages/schemas/src/configs.ts b/packages/schemas/src/configs.ts index 77c257a54834..aea1cd78b63a 100644 --- a/packages/schemas/src/configs.ts +++ b/packages/schemas/src/configs.ts @@ -321,6 +321,7 @@ export const FunboxNameSchema = z.enum([ "asl", "rot13", "no_quit", + "lefthand", ]); export type FunboxName = z.infer;