The precomputed levels are contained in the
file 'ttraffic.levels' in the install directory. The level file is
accessed through the module 'LevelFileParser'.
The file 'ttraffic.levels' does not contain solutions, only
levels. The format is as follows:
The file consists of a sequence of 4-byte numbers, lowest byte first.
The file starts with a directory.
The first number of the directory is 21.
The next number of the directory is 52.
The next number of the directory is the offset in the level file of the
levels whose solution requires at least 20 moves.
The next number of the directory is the offset of the
levels whose solution requires at least 21 moves.
...
The last number of the directory is the offset of the
levels whose solution requires at least 51 moves.
After the directory come the actual levels. The levels are encoded
in two 32 bit numbers, corresponding respectively to the rows and columns.
The rows and columns are encoded as 6 strips of 4 bits. The least
significant four bits correspond to the first row/column. The upper
8 bits of the 4 byte numbers are zero.
Every strip is encoded as 4 bits, i.e. a number between 0 and
15. The corresponding strip is as follows (a,b are cars or trucks).