Skip to content
Colonel Panic edited this page Aug 13, 2026 · 3 revisions

Sudoku Solver (Odin + Raylib 6) — TODO

Last updated: 2026-08-13

DONE

  • 9x9 grid, themes (light/dark), navigation (mouse, arrows, hjkl/wasd, Tab blocks)
  • Number entry, clear cell, conflict highlight (row/col/box)
  • Lock/unlock toggle (Ctrl+Shift+L), clear unlocked (Ctrl+Shift+C)
  • Exit confirmation, monospaced fonts, locked cell visuals
  • Package refactor (root main.odin, src: collection, Game state, events/render/...)
  • Feature parity after refactor
  • Cleanup pass (thickness, fonts.destroy, imports, orchestrator, etc.)
  • Backtracking solver (Alt+S); tested on NYT easy/hard and blank board

CLEANUP (optional polish)

  • board_has_any_conflict at start of solve (reject illegal givens; fix impossible test)
  • Skip/limit empty-board unit test if too heavy
  • log.info at start of each test
  • Merge dev → master when ready

NEXT (core)

  • Save / Load puzzles
    • Ctrl+S / Ctrl+O
    • Simple text format (human-editable preferred)
    • optional: warn if unsolvable before save (solve on a copy)
  • dirty flag; warn on exit if unsaved
  • Wire solver polish from cleanup above into mainline tests

LATER

  • Undo / Redo
    • History stack of board (+ locked)
    • Persistent undofile (Neovim-style) keyed to puzzle path
  • Pencil marks / candidates
  • Print / export
    • PNG (easiest)
    • SVG (clean print)
    • PDF (later)
  • Share string (81 chars 0-9) to clipboard
  • Settings (themes, warning toggles, "don't show again")
  • Text-editable puzzle library under assets/puzzles/
    • Named boards in a simple file format
    • Optional: VS Code / Neovim helpers to author puzzles

STRETCH (after save/load + polish)

  • More themes (Space to cycle; later microui picker)
  • On-screen toolbar or microui menus
  • WASM / Linux polish

NOTES

  • Coordinate convention: selected.x = row, selected.y = col
  • Locked cells = puzzle givens; Ctrl+Shift+C clears the rest
  • Prefer alphabetical order for struct fields and constant lists
  • Build: make run (odin run . -collection:src=src)
  • Tests: make test (odin test src/logic -collection:src=src)
  • Wiki: https://github.com/codemonkeywtf/sudoku-solver/wiki/DOC

Clone this wiki locally