diff options
| author | Michael Quevillon <m.quevil@gmail.com> | 2018-09-13 00:19:32 -0400 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2018-09-13 09:11:33 +0100 |
| commit | 55be8e50db2c103850c95db879c02cd945c36d5f (patch) | |
| tree | 0f40ca014e732195c650f4461f1818c8245473da /cube.c | |
| parent | 1db5961b8b0b9f55d8f56f1621f7e1c7041e9e9e (diff) | |
| download | puzzles-55be8e50db2c103850c95db879c02cd945c36d5f.zip puzzles-55be8e50db2c103850c95db879c02cd945c36d5f.tar.gz puzzles-55be8e50db2c103850c95db879c02cd945c36d5f.tar.bz2 puzzles-55be8e50db2c103850c95db879c02cd945c36d5f.tar.xz | |
cube.c: Prohibit unsolvable single row/column game
For cube games, the minimum for any dimension should be 2, as there is
no net of the cube that is only one row/column. The previous logic
would permit a 1x7 game (for example) that could never be solved.
Diffstat (limited to 'cube.c')
| -rw-r--r-- | cube.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -543,8 +543,8 @@ static const char *validate_params(const game_params *params, int full) return "Unrecognised solid type"; if (solids[params->solid]->order == 4) { - if (params->d1 <= 0 || params->d2 <= 0) - return "Both grid dimensions must be greater than zero"; + if (params->d1 <= 1 || params->d2 <= 1) + return "Both grid dimensions must be greater than one"; } else { if (params->d1 <= 0 && params->d2 <= 0) return "At least one grid dimension must be greater than zero"; |