8d57550d02
Sudoku: make it possible to preserve the RawData from the ScratchPad and use it in the solving process.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7263 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-10 11:11:56 +00:00
153d084e6e
Sudoku:
...
- validate user input before trying to solve.
- stop calculating if nothing has changed.
- refine messages if puzzle isn't solved.
- remove unused code.
- rename some methods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7251 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-09 12:32:47 +00:00
e138543a0b
Sudoku: change ScratchPad:
...
- different text representation of digitset
- custom editor for DigitSets
- forbid editing cells taht are already locked (in FRawData)
- disable RangeSelect in the grids
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7245 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-06 18:21:54 +00:00
636e8484ce
Sudoku: implement a scratchpad for Sudoku's that aren't completely solved.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7242 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-05 13:56:22 +00:00
46162a2189
Sudoku: unify indentation style (begin..end blocks). No functional changes.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7241 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-05 11:58:57 +00:00
b922ed417d
Sudoku: SaveSudokuToFile: don't write trailing empty line.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7235 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-05 10:41:57 +00:00
f81cdec6d9
Sudoku: refine sulution of r7233.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7234 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 19:33:39 +00:00
fec72dffcc
Sudoku: center text in cells.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7233 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 19:29:42 +00:00
a8d9978525
Sudoku: implement loading and saving sudoku files (as text).
...
Include sample.sudoku file that can be loaded and solved.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7232 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 19:22:40 +00:00
8dbd92b634
Sudoku: have separate Edit and Clean buttons (Fill also cleared the grid).
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7231 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 17:47:07 +00:00
c9719c0bb9
Sudoku: remove SGrid's OnSetEditText event, it's not necessary. TheValues is fully set wehn querying a solution.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7230 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 17:41:42 +00:00
7f3b147fc1
Sudoku: make TSudoku internally work with integers, not characters.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7229 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 17:39:25 +00:00
e1d784ff8a
Sudoku: restrict user input in grid.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7228 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 17:19:07 +00:00
20e629be7a
Sudoku: rename variables, make form a dialog (not resizable), set form caption.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7227 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 16:41:52 +00:00
a95b456fb5
Sudoku: adjust width/height of grid, and width of mainform @runtime.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7226 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 16:37:48 +00:00
b974c2145b
Sudoku: add comment about original import in lazarus-ccr, so this can more easily be foud back for those interested.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7225 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 15:24:53 +00:00
2070a8bf06
Sudoku: give better message if sudoku isn't completely solved.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7224 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 15:20:09 +00:00
268c0c1146
Sudoku: suppress hint.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7223 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 15:12:28 +00:00
36975bdaef
Sudoku: make grid en cell sizes larger, add gridlines, remove unised label.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7222 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 15:09:59 +00:00
20fbfe933f
Sudoku: use OnPrepareCanvas instead of OnDrawCell. Adjust background-color, so text is readable.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7221 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 15:02:45 +00:00
ee602a31cd
Sudoku: use fpc-type resource instead of old Lazarus .lrs style resource.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7219 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 14:55:32 +00:00
7b4b0cb513
Sudoku: fix errors during loading the project and fix complilation errors, fix project paths.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7218 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 14:49:55 +00:00
e154c5a902
Add Sudoku solver application. Initial import (original code by Matthijs Willemstein).
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7217 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-01-04 14:39:11 +00:00