Skip to content

Sudoku command #985

@DMFriends

Description

@DMFriends

Description

I would like to make a Sudoku game command for Lancebot. Here are the rules for playing Sudoku, in case you don't know: https://sudoku.com/how-to-play/sudoku-rules-for-complete-beginners/

Reasoning

Sudoku is one of the most popular puzzle games in the world currently and it provides a good challenge for your brain.

Proposed Implementation

  • The bot will print an embed with a 6x6 Sudoku board, like so:
    image
  • The grid will have the columns numbered and rows alphabetized, like so:
    image
  • User will simply enter their input for the game by typing the coordinates of the square that they want to enter a number in (ex. A3), then the number they want to input (ex. 8). So in this case, what the user would type is: A3 8. If the user guesses correctly, then the bot will automatically update the original embed with the correct guess added. If the user wishes to edit their guess, they may do so by simply editing the message. If the user wants to remove a number from a square, they can type something like this: A3 X.
  • Make 2 buttons, one called "Hint" and the other "Give Up". I think it's obvious what I want those buttons to do :)
  • To avoid spam of the "Hint" button, I'm going to record the last time the button is pressed using the built-in time module in Python and count 3 minutes from that time and after that time elapses, allow the user to click that button again. Then the process repeats.
  • I am also considering the possibility of the bot generating puzzles with multiple or no solutions. The way I'm going to prevent this from happening is by using the backtracking method. I did some research online and I will be using this website as a guide.

Would you like to implement this yourself?

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

Metadata

Metadata

Labels

status: approvedThe issue has received a core developer's approvaltype: featureRelating to the functionality of the application.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions