# The XSokoban format

The maps of the levels are stored in XSokoban format, which consists of the following elements:

Character | Meaning
--- | ---
# | Wall
(space) | Empty square
. | Goal square
$ | Gem on an empty square
* | Gem on a goal square
@ | Start position of the keeper on an empty square
+ | Start position of the keeper on a goal square

Here you see an example, which is the first level of the Microban collection:

    ####
    # .#
    #  ###
    #*@  #
    #  $ #
    #  ###
    ####

After the map additional information about the map may follow (which are not part of the original XSokoban format). Note that all keywords are not case sensitive. The author of the map can be specified, by adding a line beginning with Author: and the the name of the author. An email address of the author may be added after the authors name, enclosed in < and > or ( and ). There must be at least one space between the author's name and the email address. If more than one author wrote the level, other authors are added by separating them with a comma. An example would be:

    Author: Green W. Gem <gem@sokoban.gem>, Blue Stone (stone@sokoban.gem)

You can also specify the homepage, where the level can be downloaded. Just add a line beginning with Homepage: after the map and add the address of the homepage:

    Homepage: http://www.sokoban.gem/~gem/level.html

Analog a copyright message can be added, by starting a line with Copyright:

    Copyright: (C) 1998

A difficulty can also be specified, by by starting a line with Difficulty: . The value given must be in the range 0 to 10. The meaning of the value is:

Difficulty | Meaning
--- | ---
0 | Trivial
1 | Very easy
2 | Easy
3 | Easy to medium
4 | Medium
5 | Medium to hard
6 | Hard
7 | Very hard
8 | Very hard to nearly impossible
9 | Nearly impossible
10 | Impossible

If the specific map has a name, it will be given in a line starting with Name: .

    Name: A wonderful map

You can add additional information by adding lines starting with Info: . There can be more than one info line. Lines which are not recognized are simply ignored. Lets look at a complete example:

    ####
    # .#
    #  ###
    #*@  #
    #  $ #
    #  ###
    ####
    Author: David W. Skinner <sasquatch@bentonrea.com>
    Homepage: http://users.bentonrea.com/~sasquatch/sokoban/
    Copyright: (C) 2000
    Name: Level 1 of 155 from collection Microban
    Difficulty: 5
    Info: The first information.
    Info: The second information.
    This line will just be ignored.
    And so will this.