Repository navigation
Open
Labels
status: approvedThe issue has received a core developer's approvalThe issue has received a core developer's approvaltype: featureRelating to the functionality of the application.Relating to the functionality of the application.
Description
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:

- 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
timemodule 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
Assignees
Labels
status: approvedThe issue has received a core developer's approvalThe issue has received a core developer's approvaltype: featureRelating to the functionality of the application.Relating to the functionality of the application.
Activity
b0nes1 commentedon Dec 19, 2021
Sudoku is fun, but I'm not sure it's well suited to be played in discord. An average Sudoku game takes about 20 minutes to play which seems quite a long time for a discord mini game. What about a mini Sudoku in a 4x4 grid?
DMFriends commentedon Dec 19, 2021
Ok, maybe you're right about the game being too long, but how would a 4x4 grid work? @sn4u
b0nes1 commentedon Dec 19, 2021
The rules are the same, just with less numbers
DMFriends commentedon Dec 19, 2021
Ok, if that's the case, then I can do that.
onerandomusername commentedon Dec 20, 2021
As we were talking about on discord, by reducing the size to a 4x4, we could use buttons for the user interface instead
Although, a 4x4 seems kind of small for a sudoku game, it should be fun enough.
However, if using buttons, it would not be possible to expand it any larger, so it would be a tradeoff that we would need to make.
DMFriends commentedon Dec 20, 2021
I think 4x4 should be fine with buttons. Not sure what you mean by "tradeoff" @onerandomusername
onerandomusername commentedon Dec 20, 2021
Given we can only have 5x5 buttons in total as discord limitation, if we use buttons we cannot ever grow beyond that size.
DMFriends commentedon Dec 20, 2021
Ah, I see. To be honest, now that I think about this, I feel like 4x4 would a bit too easy. Another thought I had was to make this game thread based so it's not taking up the entire channel but they haven't been enabled on PyDis yet, so I'm not sure if that's possible, at least without making this issue stalled.
onerandomusername commentedon Dec 20, 2021
Its not possible right now to use threads, no. I do know that you would be able to get some nice colours out of the codeblock by setting the codeblock language.
The main reason I was on buttons is because the suggested input does not seem the most user-friendly--but only if there's a better option.
This looks complicated to me, although its probably the best way to input a number. We maybe could try something with selects and buttons... but this works so...
b0nes1 commentedon Dec 20, 2021
What about an image of the board that we edit every time the player makes a move? Could be done with PIL
13 remaining items
DMFriends commentedon Aug 22, 2023
Go ahead! Good luck!
wookie184 commentedon Aug 23, 2023
@n0Oo0Oo0b I've assigned you.
Given there have been a few different proposals for how this could be done here, could you clarify what you are working on? (e.g. what size, how it will be displayed to the user, how the user will enter guesses)
salty-tree commentedon Aug 23, 2023
.sudoku startto start,.sudoku [location] [number]to enter guesses. If the guess is correct, the board will be updated (most likely edit the original message). If the guess is incorrect, the bot will indicate it (perhaps a:x:reaction) and leave the board unchanged.wookie184 commentedon Aug 26, 2023
Sounds good 👍
Xithrius commentedon Dec 1, 2023
@n0Oo0Oo0b Hello. Just wondering if there has been any progress on this feature. I'd like to see it get implemented. Thanks!
salty-tree commentedon Dec 2, 2023
I did have some progreess on the board generation but this has been on my backburner for a while. I'll be able to work on it soon once my exams are over and I'll open a draft PR once the board generation is done.
DMFriends commentedon Aug 2, 2025
Hey @n0Oo0Oo0b! Have you worked on this issue at all since your last comment? If so (or even if you haven't) and you're still interested in working on it, I'm free for the next few weeks until I start college and would love to work on it together if that's cool with you. Let me know. Thanks!
salty-tree commentedon Aug 3, 2025
@DMFriends Sure, I'd be happy to work on it together! I only have a bit of uncommitted code for generating the sudoku board. How would collaboration work git-wise?
DMFriends commentedon Aug 3, 2025
I will invite you as a collaborator to my fork.
salty-tree commentedon Aug 5, 2025
I think adding multiplayer functionality similar to the duck game could also work pretty well. Something like +1 point for filling in a digit correctly / -1 point for an incorrect guess; once the whole grid is filled, the bot would display each user's total score.
DMFriends commentedon Aug 5, 2025
Interesting idea. Let's see what the Core Devs think. @wookie184 thoughts?
DMFriends commentedon Aug 5, 2025
Also can I be assigned to the issue again since I'm now working on this together with n0ob?
Xithrius commentedon Aug 6, 2025
@DMFriends assigned!