h48

A prototype for an optimal Rubik's cube solver, work in progress.
git clone https://git.tronto.net/h48
Download | Log | Files | Refs | README | LICENSE

h48_to_lst.c (395B)


      1 #include <stdio.h>
      2 #include <inttypes.h>
      3 #include <stdbool.h>
      4 
      5 #include "../src/nissy.h"
      6 
      7 #define STRLENMAX 1000
      8 
      9 int main(void) {
     10 	char strin[STRLENMAX], strout[STRLENMAX];
     11 	int result;
     12 
     13 	fgets(strin, STRLENMAX, stdin);
     14 
     15 	result = nissy_convertcube("H48", "LST", strin, strout);
     16 	if (result)
     17 		fprintf(stderr, "Error converting cube: code %d\n", result);
     18 
     19 	fputs(strout, stdout);
     20 
     21 	return 0;
     22 }