|
1 Fill the playable area of the level. Start at the "man" position and recursively fill neighbouring squares
until you hit a wall. The result is shown in red here.
|
|
5 Encode the level, using the usual characters ( $@#.+*). Each line must be terminated with
newline (hex 0A).
|
############
#### @####
### *$ ###
# . .#. $###
# $$ #. ###
### ..$ #
########## #
############
|
|
2 Fill with walls. Change every square that is not marked, to wall. This eliminates
everything outside the playable area.
|
|
6 Calculate an MD5 message digest of the string from step 5. The calculated sum is 32 characters long, but only the first 16 are used.
MD5 is available in most scripting languages.The specification can be found
here RFC 1321.
The result in this example is: 545CE11D547CC6D6.
|
|
3 Reduce walls. Make the four outer walls exactly one unit thick at its thinnest.
|
|
7 Rotate and mirror the level in all possible combinations and repeat steps 5 and 6.
This produces eight different MD5 sums.
|
545CE11D547CC6D6
A95C4600C6769137
F8C5D36B1F718D0F
3D984F1C449D212B
F7D213152DAA551E
28FBF9ECE43024B1
017F1D37EE023ACB
3B2D3843FEC69222
|
|
4 The finished level.
|
|
8 Final step is to select the numerically smallest of the eight sums. In this case the level identity is: 017F1D37EE023ACB.
Note that there is a (very) slight risk that two totally different levels will produce the same identity.
|