Skip to content

Refactor/fiveletters slice#128

Merged
rustwizard merged 4 commits into
masterfrom
refactor/fiveletters-slice
Jun 14, 2026
Merged

Refactor/fiveletters slice#128
rustwizard merged 4 commits into
masterfrom
refactor/fiveletters-slice

Conversation

@rustwizard

Copy link
Copy Markdown
Owner

No description provided.

Balda forbids proper nouns. The dictionary currently loads 253 leading-
uppercase keys (Диана, Аллах, Земля...); a capitalized word can even be
picked as the initial board word, breaking lowercase lookups for words that
reuse its cells. Failing test asserts no leading-uppercase keys.
Skip leading-uppercase keys in NewDictionary so proper nouns (Диана, Аллах,
Земля) are neither playable nor selectable as the initial board word. Their
lowercase common-noun homographs (парка, земля, север) are separate keys and
remain. Removes the rare case where a capitalized initial word broke lookups.
The map had sequential integer keys — effectively a slice with overhead.
Use append instead of a manual counter, which also avoids a latent bug where
the counter reset per decoded JSON object would have overwritten keys.
@rustwizard rustwizard self-assigned this Jun 14, 2026
@rustwizard rustwizard merged commit 7c77c3a into master Jun 14, 2026
2 checks passed
@rustwizard rustwizard deleted the refactor/fiveletters-slice branch June 14, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant