Next / Previous / Contents / Shipman's homepage

3. Operation of the script

The kkck script takes as input a puzzle encoded as a text file in a straightforward form. Here is the example puzzle from Section 1, “Introduction to crosspatches” in its encoded form:

#####
# #
# #
######
# #

idyll kriss kross
solver

An input file is a sequence of lines of three types:

If initial clues are given, the letters of the clue replace the corresponding # characters in the framework. For example, here is a framework section with one of the words already filled in:

##i##
# d
# y
##l###
# l

Comments may be included anywhere in the input file by starting each comment line with an exclamation point (“!”) character.

To solve a puzzle, run kkck like this:

kkck filename

where the filename is the name of the input file.

The program will print out all solutions (if there are any), followed by a line giving the total number of solutions. A properly constructed puzzle will have exactly one solution.