[{"data":1,"prerenderedAt":168},["ShallowReactive",2],{"project:sudoku":3},{"id":4,"title":5,"body":6,"demo":133,"description":134,"docs":135,"draft":136,"extension":137,"highlights":138,"image":148,"language":149,"meta":150,"navigation":151,"order":152,"path":153,"repo":154,"seo":155,"site":135,"stack":156,"stem":161,"tagline":162,"tags":163,"__hash__":167},"projects\u002Fprojects\u002Fsudoku.md","Sudoku Pro",{"type":7,"value":8,"toc":126},"minimark",[9,14,18,26,34,38,41,116,119,123],[10,11,13],"h2",{"id":12},"the-interesting-problem","The interesting problem",[15,16,17],"p",{},"Writing a Sudoku solver is a known exercise: backtracking search finishes in\nmilliseconds. But a solver that brute-forces the answer cannot teach anyone\nanything, because \"the answer is 7 because I tried every branch\" is not a\nreason.",[15,19,20,21,25],{},"So the engine here solves the way a person does. It models candidates per cell\nand applies human techniques in ascending order of difficulty - naked single,\nhidden single, then pointing pairs, box\u002Fline reduction, and further - returning\nthe ",[22,23,24],"em",{},"simplest"," technique that makes progress on the current board, along with\nthe cells that justify it.",[15,27,28,29,33],{},"That constraint, ",[30,31,32],"strong",{},"explainability over speed",", is what makes the design\nnon-trivial. The hint system and the difficulty grader fall out of it: a puzzle's\nrating is the hardest technique required to solve it without guessing.",[10,35,37],{"id":36},"where-the-tests-are","Where the tests are",[15,39,40],{},"The logic is separated from the UI precisely so it can be tested as logic. Six\nunit-tested modules cover the core:",[42,43,44,57],"table",{},[45,46,47],"thead",{},[48,49,50,54],"tr",{},[51,52,53],"th",{},"Module",[51,55,56],{},"What it proves",[58,59,60,76,86,96,106],"tbody",{},[48,61,62,73],{},[63,64,65,69,70],"td",{},[66,67,68],"code",{},"sudokuCore"," \u002F ",[66,71,72],{},"sudokuEngine",[63,74,75],{},"Constraint propagation and validity",[48,77,78,83],{},[63,79,80],{},[66,81,82],{},"sudokuGrader",[63,84,85],{},"Difficulty rating matches required technique",[48,87,88,93],{},[63,89,90],{},[66,91,92],{},"nextHint",[63,94,95],{},"The right technique is chosen, with correct justification",[48,97,98,103],{},[63,99,100],{},[66,101,102],{},"score",[63,104,105],{},"Scoring and streak rules",[48,107,108,113],{},[63,109,110],{},[66,111,112],{},"dailyPuzzle",[63,114,115],{},"Deterministic daily generation",[15,117,118],{},"Four Playwright specs cover the parts unit tests cannot: game flow, pausing,\npreferences, and resuming an interrupted session.",[10,120,122],{"id":121},"the-rest","The rest",[15,124,125],{},"Installable PWA that works offline, keyboard-driven controls, pencil-mark notes\nwith auto-fill, undo, and a bilingual interface. Deployed to GitHub Pages on\nevery push.",{"title":127,"searchDepth":128,"depth":128,"links":129},"",2,[130,131,132],{"id":12,"depth":128,"text":13},{"id":36,"depth":128,"text":37},{"id":121,"depth":128,"text":122},"https:\u002F\u002Fterrorsquad.github.io\u002Fsudoku\u002F","A Sudoku game that teaches you to solve Sudoku. A constraint-propagation engine detects which human technique applies to the current board and walks through the reasoning, step by step.",null,false,"md",[139,142,145],{"value":140,"label":141},"6","unit-tested modules: engine, grader, hints, scoring",{"value":143,"label":144},"8+","solving techniques, from naked single upward",{"value":146,"label":147},"PWA","installable, works offline","\u002Fprojects\u002Fsudoku.webp","TypeScript",{},true,6,"\u002Fprojects\u002Fsudoku","https:\u002F\u002Fgithub.com\u002FTerrorSquad\u002Fsudoku",{"title":5,"description":134},[157,158,149,159,160,146],"Nuxt 4","Vue 3","Vitest","Playwright","projects\u002Fsudoku","A solver that explains itself",[164,149,165,166],"Algorithms","Testing","Vue","y6oALmqADy3WmQ6gRGDNv76FOBbn-H-OB8OArn-RVrQ",1785847686129]