From 3568412f8f230774d0d11d7ed1c897424f95d3ef Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 11 Nov 2021 21:37:34 +0100 Subject: Rewritten from scratch. Welocme nissy 2.0! --- old/2021-06-14-oldalg/cube.h | 73 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 old/2021-06-14-oldalg/cube.h (limited to 'old/2021-06-14-oldalg/cube.h') diff --git a/old/2021-06-14-oldalg/cube.h b/old/2021-06-14-oldalg/cube.h new file mode 100644 index 0000000..a17c291 --- /dev/null +++ b/old/2021-06-14-oldalg/cube.h @@ -0,0 +1,73 @@ +#ifndef CUBE_H +#define CUBE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include "cubetypes.h" + +/* Steps *********************************************************************/ + +extern Step eofb_HTM; +extern Step eorl_HTM; +extern Step eoud_HTM; +extern Step coud_HTM; +extern Step corl_HTM; +extern Step cofb_HTM; +extern Step coud_URF; +extern Step corl_URF; +extern Step cofb_URF; +extern Step corners_HTM; +extern Step corners_URF; +extern Step edges_HTM; +extern Step drud_HTM; +extern Step optimal_HTM; + +extern PruneData pd_eofb_HTM; +extern PruneData pd_coud_HTM; +extern PruneData pd_corners_HTM; +extern PruneData pd_ep_HTM; +extern PruneData pd_drud_HTM; + +/* Public functions **********************************************************/ + +Cube apply_alg(Alg *alg, Cube cube); +Cube apply_move(Move m, Cube cube); +Cube apply_trans(Trans t, Cube cube); +bool block_solved(Cube cube, Block); +Center center_at(Cube cube, Center c); +Cube compose(Cube c2, Cube c1); /* Use c2 as an alg on c1 */ +Corner corner_at(Cube cube, Corner c); +Edge edge_at(Cube cube, Edge e); +bool equal(Cube c1, Cube c2); +Cube inverse_cube(Cube cube); +Move inverse_move(Move m); +Trans inverse_trans(Trans t); +bool is_admissible(Cube cube); +bool is_solved(Cube cube, bool reorient); +int piece_orientation(Cube cube, int piece, char *orientation); +void print_cube(Cube cube); +Cube random_cube(); +AlgList * solve(Cube cube, Step step, SolveOptions *opts); + +void free_alg(Alg *alg); +void free_alglist(AlgList *l); +Alg * inverse_alg(Alg *alg); +Alg * new_alg(char *str); +Alg * on_inverse(Alg *alg); +void print_alg(Alg *alg, bool l); +void print_alglist(AlgList *al, bool l); +void remove_last_move(Alg *alg); +void transform_alg(Trans t, Alg *alg); + +void print_ptable(PruneData *pd); + +void init(); + +#endif + -- cgit v1.3