A substantial patch to Solo from Bernd Schmidt, adding support for

the 'Killer Sudoku' puzzle type. As a side effect I've had to
increase the default tile size of Solo, so that the extra numbers
drawn in the squares in Killer mode were still legible.

[originally from svn r8455]
This commit is contained in:
Simon Tatham
2009-02-22 12:16:54 +00:00
parent 407f29c46f
commit 3d6de1eb47
3 changed files with 2074 additions and 673 deletions

View File

@ -1,7 +1,8 @@
This software is copyright (c) 2004-2008 Simon Tatham. This software is copyright (c) 2004-2008 Simon Tatham.
Portions copyright Richard Boulton, James Harvey, Mike Pinna, Jonas Portions copyright Richard Boulton, James Harvey, Mike Pinna, Jonas
K<EFBFBD>lker, Dariusz Olszewski, Michael Schierl and Lambros Lambrou. K<EFBFBD>lker, Dariusz Olszewski, Michael Schierl, Lambros Lambrou and
Bernd Schmidt.
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files obtaining a copy of this software and associated documentation files

View File

@ -929,10 +929,18 @@ with rectangular blocks instead of square ones, such as 2\by\.3 (a
can select \q{jigsaw} mode, in which the sub-blocks are arbitrary can select \q{jigsaw} mode, in which the sub-blocks are arbitrary
shapes which differ between individual puzzles. shapes which differ between individual puzzles.
Another available mode is \q{killer}. In this mode, clues are not
given in the form of filled-in squares; instead, the grid is divided
into \q{cages} by coloured lines, and for each cage the game tells
you what the sum of all the digits in that cage should be. Also, no
digit may appear more than once within a cage, even if the cage
crosses the boundaries of existing regions.
If you select a puzzle size which requires more than 9 digits, the If you select a puzzle size which requires more than 9 digits, the
additional digits will be letters of the alphabet. For example, if additional digits will be letters of the alphabet. For example, if
you select 3\by\.4 then the digits which go in your grid will be 1 you select 3\by\.4 then the digits which go in your grid will be 1
to 9, plus \cq{a}, \cq{b} and \cq{c}. to 9, plus \cq{a}, \cq{b} and \cq{c}. This cannot be selected for
killer puzzles.
I first saw this puzzle in \i{Nikoli} \k{nikoli-solo}, although it's I first saw this puzzle in \i{Nikoli} \k{nikoli-solo}, although it's
also been popularised by various newspapers under the name also been popularised by various newspapers under the name
@ -1000,6 +1008,11 @@ to be the product of the numbers entered in the \q{Columns} and
greater than 1 in both boxes; Jigsaw mode has no constraint on the greater than 1 in both boxes; Jigsaw mode has no constraint on the
grid size, and it can even be a prime number if you feel like it. grid size, and it can even be a prime number if you feel like it.
If you tick the \q{Killer} checkbox, Solo will generate a set of
of cages, which are randomly shaped and drawn in an outline of a
different colour. Each of these regions contains a smaller clue
which shows the digit sum of all the squares in this region.
You can also configure the type of symmetry shown in the generated You can also configure the type of symmetry shown in the generated
puzzles. More symmetry makes the puzzles look prettier but may also puzzles. More symmetry makes the puzzles look prettier but may also
make them easier, since the symmetry constraints can force more make them easier, since the symmetry constraints can force more
@ -2417,8 +2430,8 @@ grid, through the \q{Type} menu.
This software is \i{copyright} 2004-2008 Simon Tatham. This software is \i{copyright} 2004-2008 Simon Tatham.
Portions copyright Richard Boulton, James Harvey, Mike Pinna, Jonas Portions copyright Richard Boulton, James Harvey, Mike Pinna, Jonas
K\u00F6{oe}lker, Dariusz Olszewski, Michael Schierl and Lambros K\u00F6{oe}lker, Dariusz Olszewski, Michael Schierl, Lambros
Lambrou. Lambrou and Bernd Schmidt.
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files obtaining a copy of this software and associated documentation files

2687
solo.c

File diff suppressed because it is too large Load Diff