-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSolver.class.hpp
30 lines (26 loc) · 1.44 KB
/
Solver.class.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ************************************************************************** */
/* */
/* :::::::: */
/* Solver.class.hpp :+: :+: */
/* +:+ */
/* By: pacovali <[email protected]> +#+ */
/* +#+ */
/* Created: 2020/08/15 02:33:40 by pacovali #+# #+# */
/* Updated: 2020/08/15 02:33:41 by pacovali ######## odam.nl */
/* */
/* ************************************************************************** */
#ifndef __SOLVER_CLASS_HPP
# define __SOLVER_CLASS_HPP
# include "Rubik.class.hpp"
class Solver {
private:
Rubik head_; // initial cube
std::set<__uint128_t> allStates_; // all states ever generated
std::set<std::pair<uint16_t, Rubik*>> openStates_; // all states which were not yet checked
public:
Solver( const std::string& mix ); // initialize with a predefined initial mix
Solver( const int& len ); // initialize with a length of random initial mix
void solve( const int& searchType );
void printSolution( Rubik *solution ) const;
};
#endif