Tips for level maintainers
==========================

Automatic replay verification
-----------------------------

It's good style to ship solvable levels! :-)

Maintain a directory of replays for your level pack. You can test automatically
whether your pack is 100 % solvable. There are two ways, both give the same
information:

*   Open the replay browser, navigate to your directory of proof replays, and
    click "Verify Dir". Results show on-screen and in `./data/verifier.txt'.

*   Or use the command line, this prints results to standard output:
    lix --coverage replays/path/to/dir
    On Windows, stdout is closed to suppress extra console windows.
    To verify replays from the console, redirect output to a file:
    lix --coverage replays/path/to/dir > a.txt

This tests every replay in replays/path/to/dir/ for whether it solves its
the pointed-to level. Here, Lix will never consider any level saved within
the replay file. Lix will open the level in your level tree, and run the
replay against that.

In addition to the normal replay checking results, Lix prints the levels
without replay coverage. A level is listed iff it satisfies all points here:

*   The level file resides in directory from which you have tested at
    least one playable level. Subdirectories don't count.

    Example: You test a replay `replays/mydir/replay.txt' and this replay
    points to the level `levels/mylevels/a.txt'. No matter whether the
    replay solves the level or not, both `levels/mylevels/a.txt' and
    `levels/mylevels/b.txt' are considered for coverage analysis,
    but not `levels/mylevels/mysubdir/c.txt'.

*   Not a single replay in this entire noninteractive run of the application
    has proven the level solvable.

    Example: You have a directory with levels A, B, C, D, and test a directory
    with 30 replays -- 10 solving replays for A, 3 solving and 7 failing
    replays for B, 10 failing replays for C, and none for D. This will report
    levels C and D as potentially unsolvable.



Point a replay to a different level
-----------------------------------

Even though replays contain a level, during mass verification, contained levels
are ignored and the pointed-to level is used. It may happen that you move or
rename the level. Then you must hand-edit the replay file.

Replays are text files, open them in a text editor. Find the line that starts
with $FILENAME, this will usually be the first line. E.g.,

    $FILENAME single/mydir/mylevel.txt

If you've moved the level from "single/mydir/mylevel.txt" to "single/anotherdir/anotherlevel.txt", change the line and save:

    $FILENAME single/anotherdir/anotherlevel.txt

Then, during your next mass verification, Lix will match this replay
to that given level.



Level format
------------

Levels are text files, too. In a pinch, you can hand-edit them. See:

    doc/formats/level.txt
