nissy-classic

Stable branch of nissy
git clone https://git.tronto.net/nissy-classic
Download | Log | Files | Refs | README | LICENSE

alg.h (1357B)


      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 extern Moveset          moveset_HTM;
     12 extern Moveset          moveset_URF;
     13 extern Moveset          moveset_eofb;
     14 extern Moveset          moveset_drud;
     15 extern Moveset          moveset_drud_noD;
     16 extern Moveset          moveset_htr;
     17 
     18 void        append_alg(AlgList *l, Alg *alg);
     19 void        append_move(Alg *alg, Move m, bool inverse);
     20 Move        base_move(Move m);
     21 void        compose_alg(Alg *alg1, Alg *alg2);
     22 bool        commute(Move m1, Move m2);
     23 void        copy_alg(Alg *src, Alg *dst);
     24 void        free_alg(Alg *alg);
     25 void        free_alglist(AlgList *l);
     26 void        inplace(Alg * (*f)(Alg *), Alg *alg);
     27 Alg *       inverse_alg(Alg *alg);
     28 Move        inverse_move(Move m);
     29 char *      move_string(Move m);
     30 void        movelist_to_position(Move *ml, int *pos);
     31 void        moveset_to_list(Moveset ms, Move *lst);
     32 Alg *       new_alg(char *str);
     33 AlgList *   new_alglist(void);
     34 Alg *       on_inverse(Alg *alg);
     35 void        print_alg(FILE *out, Alg *alg, bool l);
     36 void        print_alglist(FILE *out, AlgList *al, bool l);
     37 void        sort_alglist(AlgList *al);
     38 void        swapmove(Move *m1, Move *m2);
     39 Alg *       unniss(Alg *alg);
     40 
     41 void        init_moveset(Moveset *ms);
     42 void        init_all_movesets(void);
     43 
     44 #endif
     45