nissy-nx

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

cube.h (1166B)


      1 #ifndef CUBE_H
      2 #define CUBE_H
      3 
      4 #include <stdio.h>
      5 
      6 #include "cubetypes.h"
      7 #include "env.h"
      8 #include "utils.h"
      9 
     10 void        compose(Cube *c2, Cube *c1); /* Use c2 as an alg on c1 */
     11 void        compose_centers(Cube *c2, Cube *c1);
     12 void        compose_corners(Cube *c2, Cube *c1);
     13 void        compose_edges(Cube *c2, Cube *c1);
     14 void        copy_cube(Cube *src, Cube *dst);
     15 void        copy_cube_centers(Cube *src, Cube *dst);
     16 void        copy_cube_corners(Cube *src, Cube *dst);
     17 void        copy_cube_edges(Cube *src, Cube *dst);
     18 bool        equal(Cube *c1, Cube *c2);
     19 void        invert_cube(Cube *cube);
     20 void        invert_cube_centers(Cube *cube);
     21 void        invert_cube_corners(Cube *cube);
     22 void        invert_cube_edges(Cube *cube);
     23 bool        is_admissible(Cube *cube);
     24 bool        is_solved(Cube *cube);
     25 void        make_solved(Cube *cube);
     26 void        make_solved_centers(Cube *cube);
     27 void        make_solved_corners(Cube *cube);
     28 void        make_solved_edges(Cube *cube);
     29 void        print_cube(Cube *cube);
     30 int         where_is_center(Center x, Cube *c);
     31 int         where_is_corner(Corner k, Cube *c);
     32 int         where_is_edge(Edge e, Cube *c);
     33 
     34 #endif
     35