diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-01-22 08:54:06 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-01-22 08:55:55 +0000 |
| commit | 5cac6a09c4db2b7e05c3e8dfd8920e2cdd1b8b03 (patch) | |
| tree | 1c9ce25633f9177782d77a7718cb5d4e4260725f /cube.c | |
| parent | 806ae71ca45f913ebfd4aa18c8f0c80a67738a13 (diff) | |
| download | puzzles-5cac6a09c4db2b7e05c3e8dfd8920e2cdd1b8b03.zip puzzles-5cac6a09c4db2b7e05c3e8dfd8920e2cdd1b8b03.tar.gz puzzles-5cac6a09c4db2b7e05c3e8dfd8920e2cdd1b8b03.tar.bz2 puzzles-5cac6a09c4db2b7e05c3e8dfd8920e2cdd1b8b03.tar.xz | |
Black Box: reject negative ball counts in game_params.
You can inject one via a game desc string such as "10x10M5m-1", and
it's clearly silly.
_Zero_ balls, on the other hand, are a perfectly fine number: there's
nothing incoherent about a BB puzzle in which the possible numbers of
balls vary from (say) 0 to 5 inclusive, so that part of the challenge
is to work out as efficiently as possible whether there are even any
balls at all.
(We only need to check minballs, because once we know minballs >= 0,
the subsequent check ensures that maxballs >= minballs, and hence, by
transitivity, maxballs >= 0 too.)
Diffstat (limited to 'cube.c')
0 files changed, 0 insertions, 0 deletions