nissy-nx

A Rubik's cube optimal solver
git clone https://git.tronto.net/nissy-nx
Download | Log | Files | Refs | README | LICENSE

alg.h (1090B)


      1 #ifndef ALG_H
      2 #define ALG_H
      3 
      4 #include <stdio.h>
      5 #include <stdlib.h>
      6 #include <string.h>
      7 
      8 #include "cubetypes.h"
      9 #include "utils.h"
     10 
     11 void        append_alg(AlgList *l, Alg *alg);
     12 void        append_move(Alg *alg, Move m, bool inverse);
     13 Move        base_move(Move m);
     14 int         compare(Move m1, Move m2); /* Return 1 (m1<m2), 0 or -1 (m1>m2) */
     15 int         compare_last(Alg *alg, Move m, bool inverse);
     16 void        compose_alg(Alg *alg1, Alg *alg2);
     17 bool        commute(Move m1, Move m2);
     18 void        copy_alg(Alg *src, Alg *dst);
     19 void        free_alg(Alg *alg);
     20 void        free_alglist(AlgList *l);
     21 Alg *       inverse_alg(Alg *alg);
     22 Move        inverse_move(Move m);
     23 char *      move_string(Move m);
     24 Alg *       new_alg(char *str);
     25 AlgList *   new_alglist();
     26 Alg *       on_inverse(Alg *alg);
     27 void        print_alg(Alg *alg, bool l);
     28 void        print_alglist(AlgList *al, bool l);
     29 void        remove_last_move(Alg *alg);
     30 void        swapmove(Move *m1, Move *m2);
     31 char *      trans_string(Trans t); /* Here because similar to move_string, move? */
     32 Alg *       unniss(Alg *alg);
     33 
     34 #endif
     35