-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCube.h
40 lines (34 loc) · 1019 Bytes
/
Cube.h
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
31
32
33
34
35
36
37
38
39
40
#ifndef CUBE_H
#define CUBE_H
#include <string>
#include <iostream>
#include <vector>
using namespace std;
class Cube{
public:
Cube();
~Cube();
Cube(const Cube &source);
//constructor to be used for graph generation.
Cube(const Cube &source, int cost);
bool turn(int turn, int times);
bool isSolved();
void printCube();
void setCube();
void upMove(bool isClockwise);
void rightMove(bool isClockwise);
void backMove(bool isClockwise);
void leftMove(bool isCLockwise);
void downMove(bool isclockwise);
void frontMove(bool isClockwise);
void rotateFace(int face, bool isClockwise);
void applyMoves(const vector <int> &moves);
void setMoves(string move);
int cube[6][3][3];
string colors[6] = {"white", "blue", "orange", "yellow", "green", "red"};
char color_char[6] = {'w', 'b', 'o', 'y', 'g', 'r'};
//this variable is for keeping track of what turn was used to get from previous vertex in graph to this current state.
int cost;
string moves;
};
#endif