Foster

Puzzle generator and solver for a uni project


Keywords
mit, program, Propose Tags, , Foster-1.1.2.tar.gz, browse, Package description, Package maintainers, Jefffrey, edit package information
License
MIT
Install
cabal install Foster-1.1.2

Documentation

###Installation

To install foster you need to install the Haskell Platform and then run:

cabal update
cabal install foster

###Global flags

You can test that everything works properly by running:

foster --version

which will print the version.

You can also call --help from foster or any of the subcommands to open a manual page that will describe the syntax for every command.

You can always turn off output, by appending the -s/--silent flag. This may or may not improve performance.

####Generating puzzles

In order to generate puzzles you need to write:

foster generate <rows>,<columns>

By default the puzzle is written to input.txt, but you can change that with the --output or -o flag. You can also specify the string to be used for the puzzle (by default is some string containing unicode characters and digits) with --text or -t.

For example, to generate a 3000x123 (3000 rows, 123 columns) puzzle stored in input2.txt using the text Some string you can use:

foster generate 3000,123 --output=input2.txt --text="Some string"

or equivalently:

foster generate 1000,1000 -oinput2.txt -t"Some String"

####Solving puzzles

To solve puzzle you'll need to specify the input file (the file containing the pieces) and the output file (the file where to put the generated puzzle):

foster solve --input=input2.txt --output=output2.txt

The above will take the puzzle in input2.txt and solve it into output2.txt. By default foster will take the puzzle in input.txt and store it into output.txt.

#####Checking solutions

If you have a solution generated by some other program, you can check it against the one foster would generate by using:

foster check --input=input2.txt --output=output2.txt

Which will check that the solution in output2.txt is valid, given the input puzzle input2.txt. By default it will use input.txt and output.txt respectively.