-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCubert.hpp
30 lines (27 loc) · 971 Bytes
/
Cubert.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
#ifndef CUBERT_H
#define CUBERT_H
#include <iostream>
#include <array>
#include <vector>
class Cubert {
private:
void (Cubert::*moves[6])(int) = {&Cubert::w_move, &Cubert::o_move, &Cubert::g_move,
&Cubert::r_move, &Cubert::b_move, &Cubert::y_move};
std::vector<char> cube;
void perm_cycle(std::array<int, 2> a, std::array<int, 2> b, std::array<int, 2> c, std::array<int, 2> d);
public:
//create a cube with an optional seed input (string of starting moves)
Cubert();
Cubert(std::string seed);
Cubert(Cubert &c);
void w_move(int direction);
void o_move(int direction);
void g_move(int direction);
void r_move(int direction);
void b_move(int direction);
void y_move(int direction);
void print_cube();
std::vector<char> get_cube() const {return cube;}
void run_moves(std::string commands);
};
#endif