nissy-classic

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

cube.h (1789B)


      1 #ifndef CUBE_H
      2 #define CUBE_H
      3 
      4 #include <stdio.h>
      5 
      6 #include "env.h"
      7 #include "pf.h"
      8 #include "utils.h"
      9 
     10 Cube        admissible_ep(Cube cube, PieceFilter f);
     11 int         array_ep_to_epos(int *ep, int *eps_solved);
     12 Cube        arrays_to_cube(CubeArray *arr, PieceFilter f);
     13 Cube        compose(Cube c2, Cube c1); /* Use c2 as an alg on c1 */
     14 Cube        compose_filtered(Cube c2, Cube c1, PieceFilter f);
     15 void        cube_to_arrays(Cube cube, CubeArray *arr, PieceFilter f);
     16 int         edge_slice(Edge e); /* E=0, S=1, M=2 */
     17 bool        equal(Cube c1, Cube c2);
     18 Cube        inverse_cube(Cube cube);
     19 bool        is_admissible(Cube cube);
     20 bool        is_solved(Cube cube);
     21 bool        is_block_solved(Cube cube, Block);
     22 bool        is_solved_center(Cube cube, Center c);
     23 bool        is_solved_corner(Cube cube, Corner c);
     24 bool        is_solved_edge(Cube cube, Edge e);
     25 void        epos_to_partial_ep(int epos, int *ep, int *ss);
     26 void        epos_to_compatible_ep(int epos, int *ep, int *ss);
     27 void        fix_eorleoud(CubeArray *arr);
     28 void        fix_cofbcorl(CubeArray *arr);
     29 Cube        fourval_to_cube(int eofb, int ep, int coud, int cp);
     30 void        free_cubearray(CubeArray *arr, PieceFilter f);
     31 Cube        move_via_arrays(CubeArray *arr, Cube c, PieceFilter pf);
     32 CubeArray * new_cubearray(Cube cube, PieceFilter f);
     33 void        print_cube(Cube cube);
     34 Center      what_center_at(Cube cube, Center c);
     35 Corner      what_corner_at(Cube cube, Corner c);
     36 Edge        what_edge_at(Cube cube, Edge e);
     37 int         what_orientation_corner(int co, Corner c);
     38 int         what_orientation_edge(int eo, Edge e);
     39 Center      where_is_center(Cube cube, Center c);
     40 Corner      where_is_corner(Cube cube, Corner c);
     41 Edge        where_is_edge(Cube cube, Edge e);
     42 
     43 void        init_cube(void);
     44 
     45 #endif
     46