]> git.gir.st - solVItaire.git/commit
freecell: fix direct addressing 'take from cell'
authorgirst <girst@users.noreply.github.com>
Wed, 20 Apr 2022 16:39:29 +0000 (18:39 +0200)
committergirst <girst@users.noreply.github.com>
Wed, 20 Apr 2022 16:44:03 +0000 (18:44 +0200)
commit9bbc25438e55b3d25cc4762311c3810352d25da7
treed096a4e6984d5fa8363a6958d87cdbd75458917a
parenteb4d6bcf0d5a593b2505a5289e1e993c9c0bf5bb
freecell: fix direct addressing 'take from cell'

the 'no take from empty stock/cell' rule had a bug that only checked the
first cell when accessed with '9'. this is because with direct
addressing mode, active.opt stays at its initial value of 0. this check
was split in two parts:

- direct addressing: only abort when all cells are empty
- other: check that struct cursor active was actually modified.

a third test was then added to make this work with mouse addressing
also.
sol.c
Imprint / Impressum