Sudoku command
See original GitHub issueDescription
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:
- The grid will have the columns numbered and rows alphabetized, like so:
- 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
Issue Analytics
- State:
- Created 2 years ago
- Comments:21 (21 by maintainers)
Top Results From Across the Web
I have created a program to play sudoku in the command line!
This is a place to learn and discuss Sudoku puzzles. ... I have created a program to play sudoku in the command line!...
Read more >ObliqueMotion/sudoku-cli: A Command Line Tool For ... - GitHub
A command-line tool for solving sudoku puzzles. Install by running: cargo install sudoku-cli; If your input is a file path, sudoku-cli will read...
Read more >Sudoku - the Tcler's Wiki!
(bernard-01-12-2005) It is a command line sudoku solver written in Tcl and named sudokut. There is no GUI: just pass the sudoku 81...
Read more >Nudoku | ncurses based sudoku game
Nudoku. Sudoku for your terminal. a game. Can't code? Can't hack? Can't do anything cool on the command line? This game will give...
Read more >Sudoku command line solver download | SourceForge.net
Download Sudoku command line solver for free. Solve 9x9 Sudoku Puzzles Using A Command Line Utility. This tool written in C uses the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, so based off this discussion (starts there), I have (hopefully) made my final decisions as to how I (and others) want this implemented.
B6 8
. If the user wishes to edit their guess, they will simply edit the message with their guess. If they wish to remove a number from the board, the user would edit the message to sayB6 X
.I believe those are the main takeaways from that conversation I linked. @onerandomusername @Sn4u Let me know if I missed anything.
Lastly, just to make sure: @jb3, do you still approve of this happening with those changes I mentioned above (in this comment)?
See https://github.com/python-discord/sir-lancebot/pull/956#issuecomment-997322591
I’m not familar with PIL myself, either