-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Two people have asked if the KAOES/keys game could "have an endless mode" or "infinite" mode e.g. because they "don't like having to restart the test every 8 inputs".
I added a hidden experiment to Typey Type so if your local storage has an item with a key of typey-KAOES-rounds with a number between 1 and 10000, the KAOES game will use that number as the number of rounds to win the game. That is, you can set it to 9999 rounds and effectively have infinite mode. It still shows "8" rounds on screen though, but it lets you go past 8 rounds anyway.
To finish building this feature into the interface:
- change the maximum number of rounds from a number to a text input.
- handle the possibility of changing the maximum number of rounds while the game is progressing e.g. set the text input to readonly once the first round is complete so that it doesn't change while the game is in progress
- handle bad input, such as zero, negative numbers, numbers over the maximum value allowed, or letters, e.g. don't set the rounds until the blur event and don't set the rounds to invalid values (either use a controlled input and set it back to a valid value or leave it uncontrolled)
- update local storage using this input e.g. using a jotai atom
- make sure the layout still looks good on varying screen sizes
It might be worth reducing the maximum value allowed to 100 instead of 10000 for UI layout reasons and doing 9999 rounds probably isn't good for you anyway…