mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Solo: add a missing params constraint for X puzzles.
Michael Quevillon points out that neither 2x1 nor 3x1 Solo can be made into an X Sudoku puzzle, on the grounds that whatever number goes in one corner of the grid is ruled out from both ends (and the centre, if any) of the opposing diagonal, and hence the X constraint can't be satisfied. (Also fixed a spurious full stop on a neighbouring line.)
This commit is contained in:
4
solo.c
4
solo.c
@ -510,7 +510,9 @@ static const char *validate_params(const game_params *params, int full)
|
||||
if ((params->c * params->r) > 31)
|
||||
return "Unable to support more than 31 distinct symbols in a puzzle";
|
||||
if (params->killer && params->c * params->r > 9)
|
||||
return "Killer puzzle dimensions must be smaller than 10.";
|
||||
return "Killer puzzle dimensions must be smaller than 10";
|
||||
if (params->xtype && params->c * params->r < 4)
|
||||
return "X-type puzzle dimensions must be larger than 3";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user