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:
Simon Tatham
2018-04-08 17:55:59 +01:00
parent c6e0161dd4
commit d95f476d8b

4
solo.c
View File

@ -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;
}