#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "general.h"
#define NBOX(n) ((n)<<2)
/* SOKOBAN Solution Finder
*
* Input File Format: XSB
*
* XSB Format definition:
* Character matrix of:
* @ MAN
* # WALL
* $ BOX
* * BOX over PLATFORM
* + PLATFORM
* - CORNER (optional) Where a BOX should not be put
* Everything that cannot be reached by the man or boxes (WALLS) must be
* marked as is: WALLS.
* All lines must be of the same length.
*/
int main(int argn, char **argv)
{
struct Map Morigin;
if (argn != 2)
{
printf("Usage: %s <mapfile>\n", argv[0]);
exit(3);
}
ReadMap(&Morigin, argv[1]);
assert(Morigin.NumPlatforms > Morigin.NumBoxesInPlatform);
init_os();
return solve_map(Morigin);
}