"\n"
"Positional arguments:\n"
"\tFILE zero or one sokoban screens\n"
- "\t when no file is specified stdin will be used\n", prg);
+ "\t when no file is specified stdin will be used\n", prg);
}
BDD subsolve(trans_t *t, BDD new){
//Read screen
time_start_read = clock();
- sokoban_screen *screen = parse_screen(inputstream, true);
+ sokoban_screen *screen = parse_screen(inputstream, false);
if (screen == NULL) {
printf("Something went wrong encoding the screen\n");
return 2;
BDD old = sylvan_false;
BDD new = init->bdd;
//Do lurd
- for(unsigned int i = 0; i<strlen(lurd); i++){
- switch(lurd[i]){
+ while(*lurd != '\0'){
+ switch(*lurd){
case 'l':
new = subsolve(rls->rell, new);
break;
new = subsolve(rls->reld, new);
break;
default:
- printf("Unknown character in lucd: '%c'\n", lurd[i]);
+ printf("Unknown character in lurd: '%c'\n", *lurd);
exit(2);
}
+ lurd++;
}
int iteration = 0;
bool found = false;
} else {
DPRINT("Processing: %s\n", argv[optind]);
FILE *currentfile = fopen(argv[optind], "r");
- if(currentfile == NULL){
- printf("File could not be opened\n");
- return 2;
- }
DPRINT("Opening file\n");
return solve(currentfile, lurd);
DPRINT("Closing file\n");