question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hangman Game Command

See original GitHub issue

Description

A hangman game command where the user can play as the guesser or the executioner. When the player is a guesser, they will guess letters one at a time. Each time, the bot will show how hanged the man is and if the half-guessed word. By default, the word will be 4-8 letters long and will have 3-4 unique letters. When the player is the executioner, the bot will first guess a letter and receive confirmation or denial about the guess from the player. If the player says the bot guessed a letter correctly, they will be prompted to provide a list of positions where the letter appears. After that, the bot will display how hanged the man is and how the word is looking so far

Reasoning

While yes, this command will not provide any real usefulness, it will provide a fun game. It can be used to kickstart channel activity as other members will most likely pitch in with what they think the word is. Besides, do any of the commands on this bot really have a useful purpose?

Proposed Implementation

The command will have two different structures based on what the player chooses to be. The guesser: .hangman <"g"/"guess"/"guesser"> [min_word_len] [max_word_len] [min_unique_letters] [max_unique_letters] or the executioner: .hangman <"e"/"exec"/"executioner"> <word_len>

To make the game varied and more or less interesting, it would require a .txt file with the ~10000 most common English words. The file would also have to be accessible to change by the script as new words are added when players come up with words that aren’t in the file. To avoid channel spam, each time the bot displays a new embed it will delete the old one. Since the player will also be writing a lot of messages, the bot will also delete all game commands issued by the player besides the most recent one.

Would you like to implement this yourself?

  • I’d like to implement this feature myself
  • Anyone can implement this feature

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
DMFriendscommented, Sep 2, 2021

@Shom770 I am pretty sure that you are allowed to work with multiple people on one PR. Cool, thanks so much!

0reactions
Shom770commented, Sep 2, 2021

@DMFriends Sounds great! I haven’t contributed much so I don’t really know if multiple people are allowed to help on one PR (I would presume so) but if you ever have time I would be more than glad to have you help out if you wanted to!

Read more comments on GitHub >

github_iconTop Results From Across the Web

hangman Command - IBM
The hangman command chooses a word of at least seven letters from a standard dictionary. The File parameter specifies an alternate dictionary. You...
Read more >
Simple command line hangman game - GitHub Gist
Simple command line hangman game. GitHub Gist: instantly share code, notes, and snippets.
Read more >
Designing Hangman, Part I. A Simple Command Line App
The rules to the game are simple — a player is presented with a series of blank characters and has a limited number...
Read more >
Hangman - Bots on Discord
How to play. You can play a Singleplayer game or play with a friend in Multiplayer. Singleplayer. h/play | h/play easy | h/play...
Read more >
¿Hangman? - Discord Bots
Features. This bot provides a few Hangman commands (more to come!) and allows us to play hangman with our friends! Wanna play a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found