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

invert.c (336B)


      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 str[STRLENMAX], cube[22], inv[22];
     11 
     12 	fgets(str, STRLENMAX, stdin);
     13 	nissy_readcube("H48", str, cube);
     14 	nissy_inverse(cube, inv);
     15 	nissy_writecube("H48", inv, str);
     16 	fputs(str, stdout);
     17 
     18 	return 0;
     19 }