From fa6e4fce00aec189cf7875c9db324fca19040f80 Mon Sep 17 00:00:00 2001 From: Angel Uriot Date: Fri, 10 Oct 2025 20:14:04 +0200 Subject: [PATCH] Remove confusing characters from game IDs (#2171) ## Description: I have often encountered the problem of characters that look alike when typing a private game code, mainly `l` / `I`, and `O` / `0`. In this PR, I therefore propose removing these 4 characters from ID generation. The number of possible combinations goes from $$2.2\times10^{14}$$ to $$1.3\times10^{14}$$, which is still the same order of magnitude. ## Please complete the following: - [ ] ~~I have added screenshots for all UI updates~~ - [ ] ~~I process any text displayed to the user through translateText() and I've added it to the en.json file~~ - [ ] ~~I have added relevant tests to the test directory~~ - [ ] ~~I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced~~ ## Please put your Discord username so you can be contacted if a bug or regression is found: `@dimension` --- src/core/Util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Util.ts b/src/core/Util.ts index fc5e6c58d..ef0f70765 100644 --- a/src/core/Util.ts +++ b/src/core/Util.ts @@ -192,7 +192,7 @@ export function assertNever(x: never): never { export function generateID(): GameID { const nanoid = customAlphabet( - "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", + "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ", 8, ); return nanoid();