6 ms·
Show HN: I Made a Sudoku Game
Source: https://github.com/alabhyajindal/sudoku/blob/main/index.html https://github.com/alabhyajindal/sudoku/blob/main/index.html
- Breadmaker 3y agoLove it! 07:43 :-)
- alabhyajindal 3y agoThanks for playing!
- beardyw 3y agoThat's fun. Creating the puzzles must be quite complex.
- pupileater 3y agoReally enjoyed it! 6:20 oo
- dave333 3y agoI entered an incorrect number and it won't let me change it??
- mjrpes 3y agoPress undo button at top
- dave333 3y agoAha - guess I didn't see that!! I spent about 5 mins trying everything to change a red 6 I had mistakenly typed instead of a the 5 I had intended.
- alabhyajindal 3y agoThis is fixed. You can now update a previously entered value. Thanks for the feedback!
- alabhyajindal 3y agoI realize that overwriting an incorrect number is the better UX than undo. I will look into this. Thanks for playing!
- jsnell 3y agoUnfortunately this doesn't feel good enough to even justify playing a full game. - The puzzles it's serving don't look very interesting or well-constructed. Are they randomly generated or from some existing puzzle DB? - I'd really like to navigate the grid with arrow keys, not just by pointing and clicking. - The app doesn't allow changing an already entered number, only undoing it. - There's no support for pencilmarks that I can see. That's an absolute requirement for a digital Sudoku implementation. - The app doesn't allow selecting multiple squares (for modifying all of them at once, or just for visualization). Sorry if this sounds harsh, but the problem is that by making a Sudoku app you're setting up a comparison to all the existing ones. Apps like SudokuPad have amazing ergonomics, a ton of features, and a seemingly endless number of expertly crafted puzzles. It's not a comparison you can do well at. Picking a different type of puzzle with less competition might work out better.
- mbb70 3y agoThe sudoku logic is very simple: https://github.com/alabhyajindal/sudoku/blob/main/index.html#L278 https://github.com/alabhyajindal/sudoku/blob/main/index.html... An empty grid is randomly filled in till it's solved, then a fixed number of cells are randomly cleared. Thus it's very possible to create an ambiguous solution. However I don't grade it against every sudoku app in history, I grade it against other handcrafted index.html sites. And on that metric I think it's pretty good. Lots of room to extend functionality of course, but it seems like a project whose value was in the making, not the having.
- imglorp 3y agoMy first game had an ambiguous solution not resolvable with logic. It was one of these deals: a.b ... b.a On the plus side, I like that it highlights the current number. For a mature exploration of this idea with many more features, look at https://www.sudokuslam.com/ https://www.sudokuslam.com/ for ideas. I've been playing that one for many years.
- alabhyajindal 3y agoI will improve the puzzle generation function so there's only one possible answer. Thanks for sharing Sudoku Slam, looks great! Especially the "auto-fill in obvious numbers".
- Masterjun 3y agoIt seems I got an ambiguous sudoku puzzle. https://i.imgur.com/AUiLP7J.png https://i.imgur.com/AUiLP7J.png I read somewhere that sudoku puzzles should always only have one solution or they don't count as "real" sudoku puzzles.
- notnaut 3y agoI had one with at least two solutions as well and one of them was classified as invalid, though it should have worked.
- alabhyajindal 3y agoThat's unfortunate. I am looking into this.
- alabhyajindal 3y agoThanks for pointing this out, I didn't know about this. I will look into improving the puzzle generation function.
- j-rom 3y agoNice! 5:28
- srcnkcl 3y agosuper cool, 5:51
- pyrolistical 3y agoI hate it when it tell you a mistake was made. Part of the challenge is figure out where you made the mistake or start over
- codegeek 3y agoNice. Always like a game of Sudoku. Did it in 6:10.
- rashidae 3y agoThe keyboard input is not being activated. I tried adding it to home (as a PWA, but didn’t see a difference.) I’d love to play it regularly, could you give me a heads up when you fix the keyboard issue? Thanks for sharing!
- alabhyajindal 3y agoKeyboard navigation has been added. You can use arrow keys or vim bindings to navigate the grid. Thanks for playing!
- jtokoph 3y agoThis is a nice clean start. For inspiration, check out https://app.crackingthecryptic.com/94Qq6qGjh2 https://app.crackingthecryptic.com/94Qq6qGjh2 for the next set of features you could add. Important ones are the ability to make "pencil marks"
- alabhyajindal 3y agoThanks for sharing! I'll check it out.
- NAHWheatCracker 3y agoThanks, 2:51. Very clean UI for mobile. I'll bookmark and do a puzzle every morning with my wordles.
- beardyw 3y agoIt is now harder than it was this morning (UK time). That's a shame. As someone with little idea what to do to solve it it was just perfect. Now I am at sea. Many of the comments here are from people who do Sudoku and probably won't use your site. With me you had a sector. That might be worth considering. Also you really should store the puzzle in application storage (eg local storage) so it is persistent over page refresh, and have a "new puzzle" button.
- alabhyajindal 3y agoDo you mean the generated puzzles are now harder? Because I haven't changed that at all. You can verify it here: https://github.com/alabhyajindal/sudoku/commits/main/index.html https://github.com/alabhyajindal/sudoku/commits/main/index.h... I am making changes based on everyone's feedback here. The game is for fun and not meant to be the best Sudoku game online. I understand that storing the puzzle is useful. I might implement it at a later time. For now, I would recommend you to refresh the page in case you get stuck on a puzzle. Thanks for your feedback!
- beardyw 3y ago> Because I haven't changed that at al My apologies. It seemed that way.