Approved Add a timer to hangmans

Shaymin Sky

Na'el is...she's your family.
is a Community Contributor
Pretty self explanatory, support timers for hangmans. Sometimes people forget a hangman is active and it just sits there until someone notices, or people just cheat the hangmans since there's enough time to look up the answer if it last long enough. Probably would be /hangman create (answer), (hint), (timer)
 
As another update:
- seperator for timer is changed from , to | so hints can use commas, so the command syntax in the video is outdated its now /hangman create (word), (hint) | timer
-timer support for hangman random command is working, I just have to fix 1 small thing about menu page updates for the delete timer button

More updates: Here's a video of the current functionality, it's a pretty big change to add optional timer support for manual and premade room hangmans (hangman randoms) but I have tested this very thoroughly over the 8/9 hours I've worked on this suggestion so I don't think I've missed anything. The commit for the timer for hangman randoms functionality is here https://github.com/smogon/pokemon-s...mits/c6cfa28e73535973ed9d8710423425fc5f133782

1 thing I didn't do in the video but you can leave the timer parameter blank for no timer, without having to use the 0 value every time. Something like /hangman create word, hint would just make a hangman with no timer. This is because the hangman default timer value used in the constructor is 0 (no timer) if the timer parameter is not in use. There's definitely a few stuff I forgot to show in the video since I had to refactor nearly so much of the code, but if you have any ideas for further testing feel free to ask me.

Also in the video, it being possible for a phrase having multiple of the same hints in the hangman random is how it actually works on showdown. This probably shouldn't be the case but it doesn't mess with the functionality of anything so whatever I guess. Probably could fix this at a later date as it's own suggestion.
 
Last edited:
Back
Top