Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Killer Sudoku mode #63

Open
PlexSheep opened this issue Jun 22, 2023 · 3 comments
Open

Add Killer Sudoku mode #63

PlexSheep opened this issue Jun 22, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@PlexSheep
Copy link

Would it be possible to add a mode for killer sudoku? (Basically add boxes which display the sums of their elements.)

I might take up on this and fork if I can make some time.

@PlexSheep
Copy link
Author

Started a fork over at my profile.

I have no experience with android developement yet, but I've gotten the app to run on my system and want this to happen :)

@kaajjo kaajjo added enhancement New feature or request good first issue Good for newcomers labels Jun 29, 2023
@kaajjo
Copy link
Owner

kaajjo commented Jun 29, 2023

I tried a long time ago to make an algorithm that would generate these boxes in real time for given boards, but after several tries I gave up.
But that's very interesting

@PlexSheep
Copy link
Author

I thought a bit about it, and did some research on how to generate a killer sudoku:

  1. Basically, we cheat a bit. Fill a Grid with a valid combination first. This get's stored as the solution, so we don't have to calculate it manually.
  2. "Invent" the cages for killer sudoku
  3. Depending on the selected difficulty, throw all of, or only a part of the generated grid away.

That way we have both a solution and a valid killer sudoku. Sadly, this is not perfect, as killer sudokus can have multiple solutions. Impementing this would also not fit in perfectly, as I saw you store the sudoku grid with an int array. I think this would not work for a killer sudoku, as we have to store both the numbers that are in our killer sudoku, which cage each tile belongs to, and the sum of the cage.

Sadly, I'm not exactly proficient with developing of android apps, that does not help too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants