FINAL PROJECT isn't it

Fork of ELEC351 by Plymouth ELEC351 Group T

Committer:
thomasmorris
Date:
Mon Jul 16 10:51:47 2018 +0000
Revision:
56:bc5345bc6650
Moves added to serial;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thomasmorris 56:bc5345bc6650 1 #include "mbed.h" //Include the mbed libraries
thomasmorris 56:bc5345bc6650 2 #include "ALGORITHM.hpp" //Include the header file, this acts like a series of forward declarations
thomasmorris 56:bc5345bc6650 3 #include "SERIAL_COMMANDS.hpp"
thomasmorris 56:bc5345bc6650 4
thomasmorris 56:bc5345bc6650 5 //Constructor
thomasmorris 56:bc5345bc6650 6 ALGORITHM::ALGORITHM() //Constructor
thomasmorris 56:bc5345bc6650 7 {
thomasmorris 56:bc5345bc6650 8 _State = 0;
thomasmorris 56:bc5345bc6650 9 }
thomasmorris 56:bc5345bc6650 10
thomasmorris 56:bc5345bc6650 11 ALGORITHM::~ALGORITHM(){} //Destructor
thomasmorris 56:bc5345bc6650 12
thomasmorris 56:bc5345bc6650 13 void ALGORITHM::ALGORITHM_INIT()
thomasmorris 56:bc5345bc6650 14 {
thomasmorris 56:bc5345bc6650 15 _State = 0;
thomasmorris 56:bc5345bc6650 16 /*
thomasmorris 56:bc5345bc6650 17 Needs to know what colour all of the positions of the cube are in so that it can enact upon this data.
thomasmorris 56:bc5345bc6650 18
thomasmorris 56:bc5345bc6650 19 */
thomasmorris 56:bc5345bc6650 20 }
thomasmorris 56:bc5345bc6650 21
thomasmorris 56:bc5345bc6650 22 void ALGORITHM::Find_edges()//Sets the internal variable to the location of all the pieces and the positions of them
thomasmorris 56:bc5345bc6650 23 {
thomasmorris 56:bc5345bc6650 24 //Reset the Pointer Values
thomasmorris 56:bc5345bc6650 25 _White_Pointer_Edge = 0;
thomasmorris 56:bc5345bc6650 26 _Orange_Pointer_Edge = 0;
thomasmorris 56:bc5345bc6650 27 _Blue_Pointer_Edge = 0;
thomasmorris 56:bc5345bc6650 28 _Red_Pointer_Edge = 0;
thomasmorris 56:bc5345bc6650 29 _Green_Pointer_Edge = 0;
thomasmorris 56:bc5345bc6650 30 _Yellow_Pointer_Edge = 0;
thomasmorris 56:bc5345bc6650 31 //Reset the
thomasmorris 56:bc5345bc6650 32
thomasmorris 56:bc5345bc6650 33 _Find_edges_White();
thomasmorris 56:bc5345bc6650 34 _Find_edges_Orange();
thomasmorris 56:bc5345bc6650 35 _Find_edges_Blue();
thomasmorris 56:bc5345bc6650 36 _Find_edges_Red();
thomasmorris 56:bc5345bc6650 37 _Find_edges_Green();
thomasmorris 56:bc5345bc6650 38 _Find_edges_Yellow();
thomasmorris 56:bc5345bc6650 39 }
thomasmorris 56:bc5345bc6650 40
thomasmorris 56:bc5345bc6650 41 void ALGORITHM::Find_Corners()//Sets the internal variable to the location of all the pieces and the positions of them
thomasmorris 56:bc5345bc6650 42 {
thomasmorris 56:bc5345bc6650 43 //Reset the Pointer Values
thomasmorris 56:bc5345bc6650 44 _White_Pointer_Corner = 0;
thomasmorris 56:bc5345bc6650 45 _Orange_Pointer_Corner = 0;
thomasmorris 56:bc5345bc6650 46 _Blue_Pointer_Corner = 0;
thomasmorris 56:bc5345bc6650 47 _Red_Pointer_Corner = 0;
thomasmorris 56:bc5345bc6650 48 _Green_Pointer_Corner = 0;
thomasmorris 56:bc5345bc6650 49 _Yellow_Pointer_Corner = 0;
thomasmorris 56:bc5345bc6650 50 //Reset the
thomasmorris 56:bc5345bc6650 51
thomasmorris 56:bc5345bc6650 52 _Find_Corners_White();
thomasmorris 56:bc5345bc6650 53 _Find_Corners_Orange();
thomasmorris 56:bc5345bc6650 54 _Find_Corners_Blue();
thomasmorris 56:bc5345bc6650 55 _Find_Corners_Red();
thomasmorris 56:bc5345bc6650 56 _Find_Corners_Green();
thomasmorris 56:bc5345bc6650 57 _Find_Corners_Yellow();
thomasmorris 56:bc5345bc6650 58 }
thomasmorris 56:bc5345bc6650 59 void ALGORITHM::_Find_Corners_White()//Identify White edges
thomasmorris 56:bc5345bc6650 60 {
thomasmorris 56:bc5345bc6650 61 //Check White side
thomasmorris 56:bc5345bc6650 62 if(CubeMap[0][0][1] == White)
thomasmorris 56:bc5345bc6650 63 {
thomasmorris 56:bc5345bc6650 64 _White_List_Corner[_White_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 65 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 66 }
thomasmorris 56:bc5345bc6650 67 if(CubeMap[0][1][0] == White)
thomasmorris 56:bc5345bc6650 68 {
thomasmorris 56:bc5345bc6650 69 _White_List_Corner[_White_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 70 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 71 }
thomasmorris 56:bc5345bc6650 72 if(CubeMap[0][1][2] == White)
thomasmorris 56:bc5345bc6650 73 {
thomasmorris 56:bc5345bc6650 74 _White_List_Corner[_White_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 75 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 76 }
thomasmorris 56:bc5345bc6650 77 if(CubeMap[0][2][1] == White)
thomasmorris 56:bc5345bc6650 78 {
thomasmorris 56:bc5345bc6650 79 _White_List_Corner[_White_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 80 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 81 }
thomasmorris 56:bc5345bc6650 82 //Check Orange side
thomasmorris 56:bc5345bc6650 83 if(CubeMap[1][0][1] == White)
thomasmorris 56:bc5345bc6650 84 {
thomasmorris 56:bc5345bc6650 85 _White_List_Corner[_White_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 86 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 87 }
thomasmorris 56:bc5345bc6650 88 if(CubeMap[1][1][0] == White)
thomasmorris 56:bc5345bc6650 89 {
thomasmorris 56:bc5345bc6650 90 _White_List_Corner[_White_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 91 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 92 }
thomasmorris 56:bc5345bc6650 93 if(CubeMap[1][1][2] == White)
thomasmorris 56:bc5345bc6650 94 {
thomasmorris 56:bc5345bc6650 95 _White_List_Corner[_White_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 96 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 97 }
thomasmorris 56:bc5345bc6650 98 if(CubeMap[1][2][1] == White)
thomasmorris 56:bc5345bc6650 99 {
thomasmorris 56:bc5345bc6650 100 _White_List_Corner[_White_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 101 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 102 }
thomasmorris 56:bc5345bc6650 103 //Check Blue side
thomasmorris 56:bc5345bc6650 104 if(CubeMap[2][0][1] == White)
thomasmorris 56:bc5345bc6650 105 {
thomasmorris 56:bc5345bc6650 106 _White_List_Corner[_White_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 107 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 108 }
thomasmorris 56:bc5345bc6650 109 if(CubeMap[2][1][0] == White)
thomasmorris 56:bc5345bc6650 110 {
thomasmorris 56:bc5345bc6650 111 _White_List_Corner[_White_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 112 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 113 }
thomasmorris 56:bc5345bc6650 114 if(CubeMap[2][1][2] == White)
thomasmorris 56:bc5345bc6650 115 {
thomasmorris 56:bc5345bc6650 116 _White_List_Corner[_White_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 117 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 118 }
thomasmorris 56:bc5345bc6650 119 if(CubeMap[2][2][1] == White)
thomasmorris 56:bc5345bc6650 120 {
thomasmorris 56:bc5345bc6650 121 _White_List_Corner[_White_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 122 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 123 }
thomasmorris 56:bc5345bc6650 124 //Check Red side
thomasmorris 56:bc5345bc6650 125 if(CubeMap[3][0][1] == White)
thomasmorris 56:bc5345bc6650 126 {
thomasmorris 56:bc5345bc6650 127 _White_List_Corner[_White_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 128 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 129 }
thomasmorris 56:bc5345bc6650 130 if(CubeMap[3][1][0] == White)
thomasmorris 56:bc5345bc6650 131 {
thomasmorris 56:bc5345bc6650 132 _White_List_Corner[_White_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 133 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 134 }
thomasmorris 56:bc5345bc6650 135 if(CubeMap[3][1][2] == White)
thomasmorris 56:bc5345bc6650 136 {
thomasmorris 56:bc5345bc6650 137 _White_List_Corner[_White_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 138 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 139 }
thomasmorris 56:bc5345bc6650 140 if(CubeMap[3][2][1] == White)
thomasmorris 56:bc5345bc6650 141 {
thomasmorris 56:bc5345bc6650 142 _White_List_Corner[_White_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 143 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 144 }
thomasmorris 56:bc5345bc6650 145 //Check Green side
thomasmorris 56:bc5345bc6650 146 if(CubeMap[4][0][1] == White)
thomasmorris 56:bc5345bc6650 147 {
thomasmorris 56:bc5345bc6650 148 _White_List_Corner[_White_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 149 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 150 }
thomasmorris 56:bc5345bc6650 151 if(CubeMap[4][1][0] == White)
thomasmorris 56:bc5345bc6650 152 {
thomasmorris 56:bc5345bc6650 153 _White_List_Corner[_White_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 154 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 155 }
thomasmorris 56:bc5345bc6650 156 if(CubeMap[4][1][2] == White)
thomasmorris 56:bc5345bc6650 157 {
thomasmorris 56:bc5345bc6650 158 _White_List_Corner[_White_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 159 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 160 }
thomasmorris 56:bc5345bc6650 161 if(CubeMap[4][2][1] == White)
thomasmorris 56:bc5345bc6650 162 {
thomasmorris 56:bc5345bc6650 163 _White_List_Corner[_White_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 164 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 165 }
thomasmorris 56:bc5345bc6650 166 //Check Yellow side
thomasmorris 56:bc5345bc6650 167 if(CubeMap[5][0][1] == White)
thomasmorris 56:bc5345bc6650 168 {
thomasmorris 56:bc5345bc6650 169 _White_List_Corner[_White_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 170 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 171 }
thomasmorris 56:bc5345bc6650 172 if(CubeMap[5][1][0] == White)
thomasmorris 56:bc5345bc6650 173 {
thomasmorris 56:bc5345bc6650 174 _White_List_Corner[_White_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 175 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 176 }
thomasmorris 56:bc5345bc6650 177 if(CubeMap[5][1][2] == White)
thomasmorris 56:bc5345bc6650 178 {
thomasmorris 56:bc5345bc6650 179 _White_List_Corner[_White_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 180 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 181 }
thomasmorris 56:bc5345bc6650 182 if(CubeMap[5][2][1] == White)
thomasmorris 56:bc5345bc6650 183 {
thomasmorris 56:bc5345bc6650 184 _White_List_Corner[_White_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 185 _White_Pointer_Corner = _White_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 186 }
thomasmorris 56:bc5345bc6650 187 }
thomasmorris 56:bc5345bc6650 188
thomasmorris 56:bc5345bc6650 189
thomasmorris 56:bc5345bc6650 190 void ALGORITHM::_Find_Corners_Orange()//Identify Orange edges
thomasmorris 56:bc5345bc6650 191 {
thomasmorris 56:bc5345bc6650 192 //Check White side
thomasmorris 56:bc5345bc6650 193 if(CubeMap[0][0][1] == Orange)
thomasmorris 56:bc5345bc6650 194 {
thomasmorris 56:bc5345bc6650 195 _Orange_List_Corner[_Orange_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 196 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 197 }
thomasmorris 56:bc5345bc6650 198 if(CubeMap[0][1][0] == Orange)
thomasmorris 56:bc5345bc6650 199 {
thomasmorris 56:bc5345bc6650 200 _Orange_List_Corner[_Orange_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 201 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 202 }
thomasmorris 56:bc5345bc6650 203 if(CubeMap[0][1][2] == Orange)
thomasmorris 56:bc5345bc6650 204 {
thomasmorris 56:bc5345bc6650 205 _Orange_List_Corner[_Orange_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 206 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 207 }
thomasmorris 56:bc5345bc6650 208 if(CubeMap[0][2][1] == Orange)
thomasmorris 56:bc5345bc6650 209 {
thomasmorris 56:bc5345bc6650 210 _Orange_List_Corner[_Orange_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 211 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 212 }
thomasmorris 56:bc5345bc6650 213 //Check Orange side
thomasmorris 56:bc5345bc6650 214 if(CubeMap[1][0][1] == Orange)
thomasmorris 56:bc5345bc6650 215 {
thomasmorris 56:bc5345bc6650 216 _Orange_List_Corner[_Orange_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 217 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 218 }
thomasmorris 56:bc5345bc6650 219 if(CubeMap[1][1][0] == Orange)
thomasmorris 56:bc5345bc6650 220 {
thomasmorris 56:bc5345bc6650 221 _Orange_List_Corner[_Orange_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 222 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 223 }
thomasmorris 56:bc5345bc6650 224 if(CubeMap[1][1][2] == Orange)
thomasmorris 56:bc5345bc6650 225 {
thomasmorris 56:bc5345bc6650 226 _Orange_List_Corner[_Orange_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 227 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 228 }
thomasmorris 56:bc5345bc6650 229 if(CubeMap[1][2][1] == Orange)
thomasmorris 56:bc5345bc6650 230 {
thomasmorris 56:bc5345bc6650 231 _Orange_List_Corner[_Orange_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 232 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 233 }
thomasmorris 56:bc5345bc6650 234 //Check Blue side
thomasmorris 56:bc5345bc6650 235 if(CubeMap[2][0][1] == Orange)
thomasmorris 56:bc5345bc6650 236 {
thomasmorris 56:bc5345bc6650 237 _Orange_List_Corner[_Orange_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 238 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 239 }
thomasmorris 56:bc5345bc6650 240 if(CubeMap[2][1][0] == Orange)
thomasmorris 56:bc5345bc6650 241 {
thomasmorris 56:bc5345bc6650 242 _Orange_List_Corner[_Orange_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 243 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 244 }
thomasmorris 56:bc5345bc6650 245 if(CubeMap[2][1][2] == Orange)
thomasmorris 56:bc5345bc6650 246 {
thomasmorris 56:bc5345bc6650 247 _Orange_List_Corner[_Orange_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 248 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 249 }
thomasmorris 56:bc5345bc6650 250 if(CubeMap[2][2][1] == Orange)
thomasmorris 56:bc5345bc6650 251 {
thomasmorris 56:bc5345bc6650 252 _Orange_List_Corner[_Orange_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 253 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 254 }
thomasmorris 56:bc5345bc6650 255 //Check Red side
thomasmorris 56:bc5345bc6650 256 if(CubeMap[3][0][1] == Orange)
thomasmorris 56:bc5345bc6650 257 {
thomasmorris 56:bc5345bc6650 258 _Orange_List_Corner[_Orange_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 259 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 260 }
thomasmorris 56:bc5345bc6650 261 if(CubeMap[3][1][0] == Orange)
thomasmorris 56:bc5345bc6650 262 {
thomasmorris 56:bc5345bc6650 263 _Orange_List_Corner[_Orange_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 264 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 265 }
thomasmorris 56:bc5345bc6650 266 if(CubeMap[3][1][2] == Orange)
thomasmorris 56:bc5345bc6650 267 {
thomasmorris 56:bc5345bc6650 268 _Orange_List_Corner[_Orange_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 269 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 270 }
thomasmorris 56:bc5345bc6650 271 if(CubeMap[3][2][1] == Orange)
thomasmorris 56:bc5345bc6650 272 {
thomasmorris 56:bc5345bc6650 273 _Orange_List_Corner[_Orange_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 274 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 275 }
thomasmorris 56:bc5345bc6650 276 //Check Green side
thomasmorris 56:bc5345bc6650 277 if(CubeMap[4][0][1] == Orange)
thomasmorris 56:bc5345bc6650 278 {
thomasmorris 56:bc5345bc6650 279 _Orange_List_Corner[_Orange_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 280 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 281 }
thomasmorris 56:bc5345bc6650 282 if(CubeMap[4][1][0] == Orange)
thomasmorris 56:bc5345bc6650 283 {
thomasmorris 56:bc5345bc6650 284 _Orange_List_Corner[_Orange_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 285 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 286 }
thomasmorris 56:bc5345bc6650 287 if(CubeMap[4][1][2] == Orange)
thomasmorris 56:bc5345bc6650 288 {
thomasmorris 56:bc5345bc6650 289 _Orange_List_Corner[_Orange_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 290 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 291 }
thomasmorris 56:bc5345bc6650 292 if(CubeMap[4][2][1] == Orange)
thomasmorris 56:bc5345bc6650 293 {
thomasmorris 56:bc5345bc6650 294 _Orange_List_Corner[_Orange_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 295 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 296 }
thomasmorris 56:bc5345bc6650 297 //Check Yellow side
thomasmorris 56:bc5345bc6650 298 if(CubeMap[5][0][1] == Orange)
thomasmorris 56:bc5345bc6650 299 {
thomasmorris 56:bc5345bc6650 300 _Orange_List_Corner[_Orange_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 301 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 302 }
thomasmorris 56:bc5345bc6650 303 if(CubeMap[5][1][0] == Orange)
thomasmorris 56:bc5345bc6650 304 {
thomasmorris 56:bc5345bc6650 305 _Orange_List_Corner[_Orange_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 306 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 307 }
thomasmorris 56:bc5345bc6650 308 if(CubeMap[5][1][2] == Orange)
thomasmorris 56:bc5345bc6650 309 {
thomasmorris 56:bc5345bc6650 310 _Orange_List_Corner[_Orange_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 311 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 312 }
thomasmorris 56:bc5345bc6650 313 if(CubeMap[5][2][1] == Orange)
thomasmorris 56:bc5345bc6650 314 {
thomasmorris 56:bc5345bc6650 315 _Orange_List_Corner[_Orange_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 316 _Orange_Pointer_Corner = _Orange_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 317 }
thomasmorris 56:bc5345bc6650 318 }
thomasmorris 56:bc5345bc6650 319 void ALGORITHM::_Find_Corners_Blue()//Identify White edges
thomasmorris 56:bc5345bc6650 320 {
thomasmorris 56:bc5345bc6650 321 //Check White side
thomasmorris 56:bc5345bc6650 322 if(CubeMap[0][0][1] == Blue)
thomasmorris 56:bc5345bc6650 323 {
thomasmorris 56:bc5345bc6650 324 _Blue_List_Corner[_Blue_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 325 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 326 }
thomasmorris 56:bc5345bc6650 327 if(CubeMap[0][1][0] == Blue)
thomasmorris 56:bc5345bc6650 328 {
thomasmorris 56:bc5345bc6650 329 _Blue_List_Corner[_Blue_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 330 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 331 }
thomasmorris 56:bc5345bc6650 332 if(CubeMap[0][1][2] == Blue)
thomasmorris 56:bc5345bc6650 333 {
thomasmorris 56:bc5345bc6650 334 _Blue_List_Corner[_Blue_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 335 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 336 }
thomasmorris 56:bc5345bc6650 337 if(CubeMap[0][2][1] == Blue)
thomasmorris 56:bc5345bc6650 338 {
thomasmorris 56:bc5345bc6650 339 _Blue_List_Corner[_Blue_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 340 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 341 }
thomasmorris 56:bc5345bc6650 342 //Check Orange side
thomasmorris 56:bc5345bc6650 343 if(CubeMap[1][0][1] == Blue)
thomasmorris 56:bc5345bc6650 344 {
thomasmorris 56:bc5345bc6650 345 _Blue_List_Corner[_Blue_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 346 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 347 }
thomasmorris 56:bc5345bc6650 348 if(CubeMap[1][1][0] == Blue)
thomasmorris 56:bc5345bc6650 349 {
thomasmorris 56:bc5345bc6650 350 _Blue_List_Corner[_Blue_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 351 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 352 }
thomasmorris 56:bc5345bc6650 353 if(CubeMap[1][1][2] == Blue)
thomasmorris 56:bc5345bc6650 354 {
thomasmorris 56:bc5345bc6650 355 _Blue_List_Corner[_Blue_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 356 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 357 }
thomasmorris 56:bc5345bc6650 358 if(CubeMap[1][2][1] == Blue)
thomasmorris 56:bc5345bc6650 359 {
thomasmorris 56:bc5345bc6650 360 _Blue_List_Corner[_Blue_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 361 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 362 }
thomasmorris 56:bc5345bc6650 363 //Check Blue side
thomasmorris 56:bc5345bc6650 364 if(CubeMap[2][0][1] == Blue)
thomasmorris 56:bc5345bc6650 365 {
thomasmorris 56:bc5345bc6650 366 _Blue_List_Corner[_Blue_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 367 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 368 }
thomasmorris 56:bc5345bc6650 369 if(CubeMap[2][1][0] == Blue)
thomasmorris 56:bc5345bc6650 370 {
thomasmorris 56:bc5345bc6650 371 _Blue_List_Corner[_Blue_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 372 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 373 }
thomasmorris 56:bc5345bc6650 374 if(CubeMap[2][1][2] == Blue)
thomasmorris 56:bc5345bc6650 375 {
thomasmorris 56:bc5345bc6650 376 _Blue_List_Corner[_Blue_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 377 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 378 }
thomasmorris 56:bc5345bc6650 379 if(CubeMap[2][2][1] == Blue)
thomasmorris 56:bc5345bc6650 380 {
thomasmorris 56:bc5345bc6650 381 _Blue_List_Corner[_Blue_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 382 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 383 }
thomasmorris 56:bc5345bc6650 384 //Check Red side
thomasmorris 56:bc5345bc6650 385 if(CubeMap[3][0][1] == Blue)
thomasmorris 56:bc5345bc6650 386 {
thomasmorris 56:bc5345bc6650 387 _Blue_List_Corner[_Blue_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 388 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 389 }
thomasmorris 56:bc5345bc6650 390 if(CubeMap[3][1][0] == Blue)
thomasmorris 56:bc5345bc6650 391 {
thomasmorris 56:bc5345bc6650 392 _Blue_List_Corner[_Blue_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 393 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 394 }
thomasmorris 56:bc5345bc6650 395 if(CubeMap[3][1][2] == Blue)
thomasmorris 56:bc5345bc6650 396 {
thomasmorris 56:bc5345bc6650 397 _Blue_List_Corner[_Blue_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 398 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 399 }
thomasmorris 56:bc5345bc6650 400 if(CubeMap[3][2][1] == Blue)
thomasmorris 56:bc5345bc6650 401 {
thomasmorris 56:bc5345bc6650 402 _Blue_List_Corner[_Blue_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 403 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 404 }
thomasmorris 56:bc5345bc6650 405 //Check Green side
thomasmorris 56:bc5345bc6650 406 if(CubeMap[4][0][1] == Blue)
thomasmorris 56:bc5345bc6650 407 {
thomasmorris 56:bc5345bc6650 408 _Blue_List_Corner[_Blue_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 409 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 410 }
thomasmorris 56:bc5345bc6650 411 if(CubeMap[4][1][0] == Blue)
thomasmorris 56:bc5345bc6650 412 {
thomasmorris 56:bc5345bc6650 413 _Blue_List_Corner[_Blue_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 414 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 415 }
thomasmorris 56:bc5345bc6650 416 if(CubeMap[4][1][2] == Blue)
thomasmorris 56:bc5345bc6650 417 {
thomasmorris 56:bc5345bc6650 418 _Blue_List_Corner[_Blue_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 419 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 420 }
thomasmorris 56:bc5345bc6650 421 if(CubeMap[4][2][1] == Blue)
thomasmorris 56:bc5345bc6650 422 {
thomasmorris 56:bc5345bc6650 423 _Blue_List_Corner[_Blue_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 424 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 425 }
thomasmorris 56:bc5345bc6650 426 //Check Yellow side
thomasmorris 56:bc5345bc6650 427 if(CubeMap[5][0][1] == Blue)
thomasmorris 56:bc5345bc6650 428 {
thomasmorris 56:bc5345bc6650 429 _Blue_List_Corner[_Blue_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 430 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 431 }
thomasmorris 56:bc5345bc6650 432 if(CubeMap[5][1][0] == Blue)
thomasmorris 56:bc5345bc6650 433 {
thomasmorris 56:bc5345bc6650 434 _Blue_List_Corner[_Blue_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 435 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 436 }
thomasmorris 56:bc5345bc6650 437 if(CubeMap[5][1][2] == Blue)
thomasmorris 56:bc5345bc6650 438 {
thomasmorris 56:bc5345bc6650 439 _Blue_List_Corner[_Blue_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 440 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 441 }
thomasmorris 56:bc5345bc6650 442 if(CubeMap[5][2][1] == Blue)
thomasmorris 56:bc5345bc6650 443 {
thomasmorris 56:bc5345bc6650 444 _Blue_List_Corner[_Blue_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 445 _Blue_Pointer_Corner = _Blue_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 446 }
thomasmorris 56:bc5345bc6650 447 }
thomasmorris 56:bc5345bc6650 448 void ALGORITHM::_Find_Corners_Red()//Identify Red edges
thomasmorris 56:bc5345bc6650 449 {
thomasmorris 56:bc5345bc6650 450 //Check White side
thomasmorris 56:bc5345bc6650 451 if(CubeMap[0][0][1] == Red)
thomasmorris 56:bc5345bc6650 452 {
thomasmorris 56:bc5345bc6650 453 _Red_List_Corner[_Red_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 454 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 455 }
thomasmorris 56:bc5345bc6650 456 if(CubeMap[0][1][0] == Red)
thomasmorris 56:bc5345bc6650 457 {
thomasmorris 56:bc5345bc6650 458 _Red_List_Corner[_Red_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 459 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 460 }
thomasmorris 56:bc5345bc6650 461 if(CubeMap[0][1][2] == Red)
thomasmorris 56:bc5345bc6650 462 {
thomasmorris 56:bc5345bc6650 463 _Red_List_Corner[_Red_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 464 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 465 }
thomasmorris 56:bc5345bc6650 466 if(CubeMap[0][2][1] == Red)
thomasmorris 56:bc5345bc6650 467 {
thomasmorris 56:bc5345bc6650 468 _Red_List_Corner[_Red_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 469 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 470 }
thomasmorris 56:bc5345bc6650 471 //Check Orange side
thomasmorris 56:bc5345bc6650 472 if(CubeMap[1][0][1] == Red)
thomasmorris 56:bc5345bc6650 473 {
thomasmorris 56:bc5345bc6650 474 _Red_List_Corner[_Red_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 475 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 476 }
thomasmorris 56:bc5345bc6650 477 if(CubeMap[1][1][0] == Red)
thomasmorris 56:bc5345bc6650 478 {
thomasmorris 56:bc5345bc6650 479 _Red_List_Corner[_Red_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 480 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 481 }
thomasmorris 56:bc5345bc6650 482 if(CubeMap[1][1][2] == Red)
thomasmorris 56:bc5345bc6650 483 {
thomasmorris 56:bc5345bc6650 484 _Red_List_Corner[_Red_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 485 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 486 }
thomasmorris 56:bc5345bc6650 487 if(CubeMap[1][2][1] == Red)
thomasmorris 56:bc5345bc6650 488 {
thomasmorris 56:bc5345bc6650 489 _Red_List_Corner[_Red_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 490 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 491 }
thomasmorris 56:bc5345bc6650 492 //Check Blue side
thomasmorris 56:bc5345bc6650 493 if(CubeMap[2][0][1] == Red)
thomasmorris 56:bc5345bc6650 494 {
thomasmorris 56:bc5345bc6650 495 _Red_List_Corner[_Red_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 496 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 497 }
thomasmorris 56:bc5345bc6650 498 if(CubeMap[2][1][0] == Red)
thomasmorris 56:bc5345bc6650 499 {
thomasmorris 56:bc5345bc6650 500 _Red_List_Corner[_Red_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 501 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 502 }
thomasmorris 56:bc5345bc6650 503 if(CubeMap[2][1][2] == Red)
thomasmorris 56:bc5345bc6650 504 {
thomasmorris 56:bc5345bc6650 505 _Red_List_Corner[_Red_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 506 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 507 }
thomasmorris 56:bc5345bc6650 508 if(CubeMap[2][2][1] == Red)
thomasmorris 56:bc5345bc6650 509 {
thomasmorris 56:bc5345bc6650 510 _Red_List_Corner[_Red_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 511 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 512 }
thomasmorris 56:bc5345bc6650 513 //Check Red side
thomasmorris 56:bc5345bc6650 514 if(CubeMap[3][0][1] == Red)
thomasmorris 56:bc5345bc6650 515 {
thomasmorris 56:bc5345bc6650 516 _Red_List_Corner[_Red_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 517 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 518 }
thomasmorris 56:bc5345bc6650 519 if(CubeMap[3][1][0] == Red)
thomasmorris 56:bc5345bc6650 520 {
thomasmorris 56:bc5345bc6650 521 _Red_List_Corner[_Red_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 522 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 523 }
thomasmorris 56:bc5345bc6650 524 if(CubeMap[3][1][2] == Red)
thomasmorris 56:bc5345bc6650 525 {
thomasmorris 56:bc5345bc6650 526 _Red_List_Corner[_Red_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 527 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 528 }
thomasmorris 56:bc5345bc6650 529 if(CubeMap[3][2][1] == Red)
thomasmorris 56:bc5345bc6650 530 {
thomasmorris 56:bc5345bc6650 531 _Red_List_Corner[_Red_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 532 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 533 }
thomasmorris 56:bc5345bc6650 534 //Check Green side
thomasmorris 56:bc5345bc6650 535 if(CubeMap[4][0][1] == Red)
thomasmorris 56:bc5345bc6650 536 {
thomasmorris 56:bc5345bc6650 537 _Red_List_Corner[_Red_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 538 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 539 }
thomasmorris 56:bc5345bc6650 540 if(CubeMap[4][1][0] == Red)
thomasmorris 56:bc5345bc6650 541 {
thomasmorris 56:bc5345bc6650 542 _Red_List_Corner[_Red_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 543 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 544 }
thomasmorris 56:bc5345bc6650 545 if(CubeMap[4][1][2] == Red)
thomasmorris 56:bc5345bc6650 546 {
thomasmorris 56:bc5345bc6650 547 _Red_List_Corner[_Red_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 548 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 549 }
thomasmorris 56:bc5345bc6650 550 if(CubeMap[4][2][1] == Red)
thomasmorris 56:bc5345bc6650 551 {
thomasmorris 56:bc5345bc6650 552 _Red_List_Corner[_Red_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 553 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 554 }
thomasmorris 56:bc5345bc6650 555 //Check Yellow side
thomasmorris 56:bc5345bc6650 556 if(CubeMap[5][0][1] == Red)
thomasmorris 56:bc5345bc6650 557 {
thomasmorris 56:bc5345bc6650 558 _Red_List_Corner[_Red_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 559 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 560 }
thomasmorris 56:bc5345bc6650 561 if(CubeMap[5][1][0] == Red)
thomasmorris 56:bc5345bc6650 562 {
thomasmorris 56:bc5345bc6650 563 _Red_List_Corner[_Red_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 564 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 565 }
thomasmorris 56:bc5345bc6650 566 if(CubeMap[5][1][2] == Red)
thomasmorris 56:bc5345bc6650 567 {
thomasmorris 56:bc5345bc6650 568 _Red_List_Corner[_Red_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 569 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 570 }
thomasmorris 56:bc5345bc6650 571 if(CubeMap[5][2][1] == Red)
thomasmorris 56:bc5345bc6650 572 {
thomasmorris 56:bc5345bc6650 573 _Red_List_Corner[_Red_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 574 _Red_Pointer_Corner = _Red_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 575 }
thomasmorris 56:bc5345bc6650 576 }
thomasmorris 56:bc5345bc6650 577 void ALGORITHM::_Find_Corners_Green()//Identify Green edges
thomasmorris 56:bc5345bc6650 578 {
thomasmorris 56:bc5345bc6650 579 //Check White side
thomasmorris 56:bc5345bc6650 580 if(CubeMap[0][0][1] == Green)
thomasmorris 56:bc5345bc6650 581 {
thomasmorris 56:bc5345bc6650 582 _Green_List_Corner[_Green_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 583 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 584 }
thomasmorris 56:bc5345bc6650 585 if(CubeMap[0][1][0] == Green)
thomasmorris 56:bc5345bc6650 586 {
thomasmorris 56:bc5345bc6650 587 _Green_List_Corner[_Green_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 588 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 589 }
thomasmorris 56:bc5345bc6650 590 if(CubeMap[0][1][2] == Green)
thomasmorris 56:bc5345bc6650 591 {
thomasmorris 56:bc5345bc6650 592 _Green_List_Corner[_Green_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 593 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 594 }
thomasmorris 56:bc5345bc6650 595 if(CubeMap[0][2][1] == Green)
thomasmorris 56:bc5345bc6650 596 {
thomasmorris 56:bc5345bc6650 597 _Green_List_Corner[_Green_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 598 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 599 }
thomasmorris 56:bc5345bc6650 600 //Check Orange side
thomasmorris 56:bc5345bc6650 601 if(CubeMap[1][0][1] == Green)
thomasmorris 56:bc5345bc6650 602 {
thomasmorris 56:bc5345bc6650 603 _Green_List_Corner[_Green_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 604 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 605 }
thomasmorris 56:bc5345bc6650 606 if(CubeMap[1][1][0] == Green)
thomasmorris 56:bc5345bc6650 607 {
thomasmorris 56:bc5345bc6650 608 _Green_List_Corner[_Green_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 609 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 610 }
thomasmorris 56:bc5345bc6650 611 if(CubeMap[1][1][2] == Green)
thomasmorris 56:bc5345bc6650 612 {
thomasmorris 56:bc5345bc6650 613 _Green_List_Corner[_Green_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 614 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 615 }
thomasmorris 56:bc5345bc6650 616 if(CubeMap[1][2][1] == Green)
thomasmorris 56:bc5345bc6650 617 {
thomasmorris 56:bc5345bc6650 618 _Green_List_Corner[_Green_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 619 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 620 }
thomasmorris 56:bc5345bc6650 621 //Check Blue side
thomasmorris 56:bc5345bc6650 622 if(CubeMap[2][0][1] == Green)
thomasmorris 56:bc5345bc6650 623 {
thomasmorris 56:bc5345bc6650 624 _Green_List_Corner[_Green_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 625 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 626 }
thomasmorris 56:bc5345bc6650 627 if(CubeMap[2][1][0] == Green)
thomasmorris 56:bc5345bc6650 628 {
thomasmorris 56:bc5345bc6650 629 _Green_List_Corner[_Green_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 630 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 631 }
thomasmorris 56:bc5345bc6650 632 if(CubeMap[2][1][2] == Green)
thomasmorris 56:bc5345bc6650 633 {
thomasmorris 56:bc5345bc6650 634 _Green_List_Corner[_Green_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 635 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 636 }
thomasmorris 56:bc5345bc6650 637 if(CubeMap[2][2][1] == Green)
thomasmorris 56:bc5345bc6650 638 {
thomasmorris 56:bc5345bc6650 639 _Green_List_Corner[_Green_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 640 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 641 }
thomasmorris 56:bc5345bc6650 642 //Check Red side
thomasmorris 56:bc5345bc6650 643 if(CubeMap[3][0][1] == Green)
thomasmorris 56:bc5345bc6650 644 {
thomasmorris 56:bc5345bc6650 645 _Green_List_Corner[_Green_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 646 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 647 }
thomasmorris 56:bc5345bc6650 648 if(CubeMap[3][1][0] == Green)
thomasmorris 56:bc5345bc6650 649 {
thomasmorris 56:bc5345bc6650 650 _Green_List_Corner[_Green_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 651 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 652 }
thomasmorris 56:bc5345bc6650 653 if(CubeMap[3][1][2] == Green)
thomasmorris 56:bc5345bc6650 654 {
thomasmorris 56:bc5345bc6650 655 _Green_List_Corner[_Green_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 656 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 657 }
thomasmorris 56:bc5345bc6650 658 if(CubeMap[3][2][1] == Green)
thomasmorris 56:bc5345bc6650 659 {
thomasmorris 56:bc5345bc6650 660 _Green_List_Corner[_Green_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 661 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 662 }
thomasmorris 56:bc5345bc6650 663 //Check Green side
thomasmorris 56:bc5345bc6650 664 if(CubeMap[4][0][1] == Green)
thomasmorris 56:bc5345bc6650 665 {
thomasmorris 56:bc5345bc6650 666 _Green_List_Corner[_Green_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 667 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 668 }
thomasmorris 56:bc5345bc6650 669 if(CubeMap[4][1][0] == Green)
thomasmorris 56:bc5345bc6650 670 {
thomasmorris 56:bc5345bc6650 671 _Green_List_Corner[_Green_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 672 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 673 }
thomasmorris 56:bc5345bc6650 674 if(CubeMap[4][1][2] == Green)
thomasmorris 56:bc5345bc6650 675 {
thomasmorris 56:bc5345bc6650 676 _Green_List_Corner[_Green_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 677 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 678 }
thomasmorris 56:bc5345bc6650 679 if(CubeMap[4][2][1] == Green)
thomasmorris 56:bc5345bc6650 680 {
thomasmorris 56:bc5345bc6650 681 _Green_List_Corner[_Green_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 682 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 683 }
thomasmorris 56:bc5345bc6650 684 //Check Yellow side
thomasmorris 56:bc5345bc6650 685 if(CubeMap[5][0][1] == Green)
thomasmorris 56:bc5345bc6650 686 {
thomasmorris 56:bc5345bc6650 687 _Green_List_Corner[_Green_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 688 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 689 }
thomasmorris 56:bc5345bc6650 690 if(CubeMap[5][1][0] == Green)
thomasmorris 56:bc5345bc6650 691 {
thomasmorris 56:bc5345bc6650 692 _Green_List_Corner[_Green_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 693 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 694 }
thomasmorris 56:bc5345bc6650 695 if(CubeMap[5][1][2] == Green)
thomasmorris 56:bc5345bc6650 696 {
thomasmorris 56:bc5345bc6650 697 _Green_List_Corner[_Green_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 698 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 699 }
thomasmorris 56:bc5345bc6650 700 if(CubeMap[5][2][1] == Green)
thomasmorris 56:bc5345bc6650 701 {
thomasmorris 56:bc5345bc6650 702 _Green_List_Corner[_Green_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 703 _Green_Pointer_Corner = _Green_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 704 }
thomasmorris 56:bc5345bc6650 705 }
thomasmorris 56:bc5345bc6650 706 void ALGORITHM::_Find_Corners_Yellow()//Identify Yellow edges
thomasmorris 56:bc5345bc6650 707 {
thomasmorris 56:bc5345bc6650 708 //Check White side
thomasmorris 56:bc5345bc6650 709 if(CubeMap[0][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 710 {
thomasmorris 56:bc5345bc6650 711 _Yellow_List_Corner[_Yellow_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 712 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 713 }
thomasmorris 56:bc5345bc6650 714 if(CubeMap[0][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 715 {
thomasmorris 56:bc5345bc6650 716 _Yellow_List_Corner[_Yellow_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 717 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 718 }
thomasmorris 56:bc5345bc6650 719 if(CubeMap[0][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 720 {
thomasmorris 56:bc5345bc6650 721 _Yellow_List_Corner[_Yellow_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 722 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 723 }
thomasmorris 56:bc5345bc6650 724 if(CubeMap[0][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 725 {
thomasmorris 56:bc5345bc6650 726 _Yellow_List_Corner[_Yellow_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 727 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 728 }
thomasmorris 56:bc5345bc6650 729 //Check Orange side
thomasmorris 56:bc5345bc6650 730 if(CubeMap[1][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 731 {
thomasmorris 56:bc5345bc6650 732 _Yellow_List_Corner[_Yellow_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 733 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 734 }
thomasmorris 56:bc5345bc6650 735 if(CubeMap[1][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 736 {
thomasmorris 56:bc5345bc6650 737 _Yellow_List_Corner[_Yellow_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 738 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 739 }
thomasmorris 56:bc5345bc6650 740 if(CubeMap[1][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 741 {
thomasmorris 56:bc5345bc6650 742 _Yellow_List_Corner[_Yellow_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 743 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 744 }
thomasmorris 56:bc5345bc6650 745 if(CubeMap[1][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 746 {
thomasmorris 56:bc5345bc6650 747 _Yellow_List_Corner[_Yellow_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 748 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 749 }
thomasmorris 56:bc5345bc6650 750 //Check Blue side
thomasmorris 56:bc5345bc6650 751 if(CubeMap[2][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 752 {
thomasmorris 56:bc5345bc6650 753 _Yellow_List_Corner[_Yellow_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 754 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 755 }
thomasmorris 56:bc5345bc6650 756 if(CubeMap[2][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 757 {
thomasmorris 56:bc5345bc6650 758 _Yellow_List_Corner[_Yellow_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 759 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 760 }
thomasmorris 56:bc5345bc6650 761 if(CubeMap[2][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 762 {
thomasmorris 56:bc5345bc6650 763 _Yellow_List_Corner[_Yellow_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 764 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 765 }
thomasmorris 56:bc5345bc6650 766 if(CubeMap[2][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 767 {
thomasmorris 56:bc5345bc6650 768 _Yellow_List_Corner[_Yellow_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 769 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 770 }
thomasmorris 56:bc5345bc6650 771 //Check Red side
thomasmorris 56:bc5345bc6650 772 if(CubeMap[3][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 773 {
thomasmorris 56:bc5345bc6650 774 _Yellow_List_Corner[_Yellow_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 775 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 776 }
thomasmorris 56:bc5345bc6650 777 if(CubeMap[3][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 778 {
thomasmorris 56:bc5345bc6650 779 _Yellow_List_Corner[_Yellow_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 780 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 781 }
thomasmorris 56:bc5345bc6650 782 if(CubeMap[3][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 783 {
thomasmorris 56:bc5345bc6650 784 _Yellow_List_Corner[_Yellow_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 785 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 786 }
thomasmorris 56:bc5345bc6650 787 if(CubeMap[3][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 788 {
thomasmorris 56:bc5345bc6650 789 _Yellow_List_Corner[_Yellow_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 790 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 791 }
thomasmorris 56:bc5345bc6650 792 //Check Green side
thomasmorris 56:bc5345bc6650 793 if(CubeMap[4][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 794 {
thomasmorris 56:bc5345bc6650 795 _Yellow_List_Corner[_Yellow_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 796 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 797 }
thomasmorris 56:bc5345bc6650 798 if(CubeMap[4][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 799 {
thomasmorris 56:bc5345bc6650 800 _Yellow_List_Corner[_Yellow_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 801 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 802 }
thomasmorris 56:bc5345bc6650 803 if(CubeMap[4][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 804 {
thomasmorris 56:bc5345bc6650 805 _Yellow_List_Corner[_Yellow_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 806 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 807 }
thomasmorris 56:bc5345bc6650 808 if(CubeMap[4][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 809 {
thomasmorris 56:bc5345bc6650 810 _Yellow_List_Corner[_Yellow_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 811 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 812 }
thomasmorris 56:bc5345bc6650 813 //Check Yellow side
thomasmorris 56:bc5345bc6650 814 if(CubeMap[5][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 815 {
thomasmorris 56:bc5345bc6650 816 _Yellow_List_Corner[_Yellow_Pointer_Corner] =1;//Store this internal variable
thomasmorris 56:bc5345bc6650 817 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 818 }
thomasmorris 56:bc5345bc6650 819 if(CubeMap[5][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 820 {
thomasmorris 56:bc5345bc6650 821 _Yellow_List_Corner[_Yellow_Pointer_Corner] =3;//Store this internal variable
thomasmorris 56:bc5345bc6650 822 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 823 }
thomasmorris 56:bc5345bc6650 824 if(CubeMap[5][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 825 {
thomasmorris 56:bc5345bc6650 826 _Yellow_List_Corner[_Yellow_Pointer_Corner] =7;//Store this internal variable
thomasmorris 56:bc5345bc6650 827 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 828 }
thomasmorris 56:bc5345bc6650 829 if(CubeMap[5][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 830 {
thomasmorris 56:bc5345bc6650 831 _Yellow_List_Corner[_Yellow_Pointer_Corner] =9;//Store this internal variable
thomasmorris 56:bc5345bc6650 832 _Yellow_Pointer_Corner = _Yellow_Pointer_Corner + 1;
thomasmorris 56:bc5345bc6650 833 }
thomasmorris 56:bc5345bc6650 834 }
thomasmorris 56:bc5345bc6650 835
thomasmorris 56:bc5345bc6650 836 void ALGORITHM::_Find_edges_White()//Identify White edges
thomasmorris 56:bc5345bc6650 837 {
thomasmorris 56:bc5345bc6650 838 //Check White side
thomasmorris 56:bc5345bc6650 839 if(CubeMap[0][0][1] == White)
thomasmorris 56:bc5345bc6650 840 {
thomasmorris 56:bc5345bc6650 841 _White_List_Edge[_White_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 842 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 843 }
thomasmorris 56:bc5345bc6650 844 if(CubeMap[0][1][0] == White)
thomasmorris 56:bc5345bc6650 845 {
thomasmorris 56:bc5345bc6650 846 _White_List_Edge[_White_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 847 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 848 }
thomasmorris 56:bc5345bc6650 849 if(CubeMap[0][1][2] == White)
thomasmorris 56:bc5345bc6650 850 {
thomasmorris 56:bc5345bc6650 851 _White_List_Edge[_White_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 852 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 853 }
thomasmorris 56:bc5345bc6650 854 if(CubeMap[0][2][1] == White)
thomasmorris 56:bc5345bc6650 855 {
thomasmorris 56:bc5345bc6650 856 _White_List_Edge[_White_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 857 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 858 }
thomasmorris 56:bc5345bc6650 859 //Check Orange side
thomasmorris 56:bc5345bc6650 860 if(CubeMap[1][0][1] == White)
thomasmorris 56:bc5345bc6650 861 {
thomasmorris 56:bc5345bc6650 862 _White_List_Edge[_White_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 863 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 864 }
thomasmorris 56:bc5345bc6650 865 if(CubeMap[1][1][0] == White)
thomasmorris 56:bc5345bc6650 866 {
thomasmorris 56:bc5345bc6650 867 _White_List_Edge[_White_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 868 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 869 }
thomasmorris 56:bc5345bc6650 870 if(CubeMap[1][1][2] == White)
thomasmorris 56:bc5345bc6650 871 {
thomasmorris 56:bc5345bc6650 872 _White_List_Edge[_White_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 873 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 874 }
thomasmorris 56:bc5345bc6650 875 if(CubeMap[1][2][1] == White)
thomasmorris 56:bc5345bc6650 876 {
thomasmorris 56:bc5345bc6650 877 _White_List_Edge[_White_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 878 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 879 }
thomasmorris 56:bc5345bc6650 880 //Check Blue side
thomasmorris 56:bc5345bc6650 881 if(CubeMap[2][0][1] == White)
thomasmorris 56:bc5345bc6650 882 {
thomasmorris 56:bc5345bc6650 883 _White_List_Edge[_White_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 884 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 885 }
thomasmorris 56:bc5345bc6650 886 if(CubeMap[2][1][0] == White)
thomasmorris 56:bc5345bc6650 887 {
thomasmorris 56:bc5345bc6650 888 _White_List_Edge[_White_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 889 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 890 }
thomasmorris 56:bc5345bc6650 891 if(CubeMap[2][1][2] == White)
thomasmorris 56:bc5345bc6650 892 {
thomasmorris 56:bc5345bc6650 893 _White_List_Edge[_White_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 894 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 895 }
thomasmorris 56:bc5345bc6650 896 if(CubeMap[2][2][1] == White)
thomasmorris 56:bc5345bc6650 897 {
thomasmorris 56:bc5345bc6650 898 _White_List_Edge[_White_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 899 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 900 }
thomasmorris 56:bc5345bc6650 901 //Check Red side
thomasmorris 56:bc5345bc6650 902 if(CubeMap[3][0][1] == White)
thomasmorris 56:bc5345bc6650 903 {
thomasmorris 56:bc5345bc6650 904 _White_List_Edge[_White_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 905 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 906 }
thomasmorris 56:bc5345bc6650 907 if(CubeMap[3][1][0] == White)
thomasmorris 56:bc5345bc6650 908 {
thomasmorris 56:bc5345bc6650 909 _White_List_Edge[_White_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 910 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 911 }
thomasmorris 56:bc5345bc6650 912 if(CubeMap[3][1][2] == White)
thomasmorris 56:bc5345bc6650 913 {
thomasmorris 56:bc5345bc6650 914 _White_List_Edge[_White_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 915 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 916 }
thomasmorris 56:bc5345bc6650 917 if(CubeMap[3][2][1] == White)
thomasmorris 56:bc5345bc6650 918 {
thomasmorris 56:bc5345bc6650 919 _White_List_Edge[_White_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 920 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 921 }
thomasmorris 56:bc5345bc6650 922 //Check Green side
thomasmorris 56:bc5345bc6650 923 if(CubeMap[4][0][1] == White)
thomasmorris 56:bc5345bc6650 924 {
thomasmorris 56:bc5345bc6650 925 _White_List_Edge[_White_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 926 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 927 }
thomasmorris 56:bc5345bc6650 928 if(CubeMap[4][1][0] == White)
thomasmorris 56:bc5345bc6650 929 {
thomasmorris 56:bc5345bc6650 930 _White_List_Edge[_White_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 931 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 932 }
thomasmorris 56:bc5345bc6650 933 if(CubeMap[4][1][2] == White)
thomasmorris 56:bc5345bc6650 934 {
thomasmorris 56:bc5345bc6650 935 _White_List_Edge[_White_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 936 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 937 }
thomasmorris 56:bc5345bc6650 938 if(CubeMap[4][2][1] == White)
thomasmorris 56:bc5345bc6650 939 {
thomasmorris 56:bc5345bc6650 940 _White_List_Edge[_White_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 941 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 942 }
thomasmorris 56:bc5345bc6650 943 //Check Yellow side
thomasmorris 56:bc5345bc6650 944 if(CubeMap[5][0][1] == White)
thomasmorris 56:bc5345bc6650 945 {
thomasmorris 56:bc5345bc6650 946 _White_List_Edge[_White_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 947 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 948 }
thomasmorris 56:bc5345bc6650 949 if(CubeMap[5][1][0] == White)
thomasmorris 56:bc5345bc6650 950 {
thomasmorris 56:bc5345bc6650 951 _White_List_Edge[_White_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 952 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 953 }
thomasmorris 56:bc5345bc6650 954 if(CubeMap[5][1][2] == White)
thomasmorris 56:bc5345bc6650 955 {
thomasmorris 56:bc5345bc6650 956 _White_List_Edge[_White_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 957 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 958 }
thomasmorris 56:bc5345bc6650 959 if(CubeMap[5][2][1] == White)
thomasmorris 56:bc5345bc6650 960 {
thomasmorris 56:bc5345bc6650 961 _White_List_Edge[_White_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 962 _White_Pointer_Edge = _White_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 963 }
thomasmorris 56:bc5345bc6650 964 }
thomasmorris 56:bc5345bc6650 965
thomasmorris 56:bc5345bc6650 966
thomasmorris 56:bc5345bc6650 967 void ALGORITHM::_Find_edges_Orange()//Identify Orange edges
thomasmorris 56:bc5345bc6650 968 {
thomasmorris 56:bc5345bc6650 969 //Check White side
thomasmorris 56:bc5345bc6650 970 if(CubeMap[0][0][1] == Orange)
thomasmorris 56:bc5345bc6650 971 {
thomasmorris 56:bc5345bc6650 972 _Orange_List_Edge[_Orange_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 973 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 974 }
thomasmorris 56:bc5345bc6650 975 if(CubeMap[0][1][0] == Orange)
thomasmorris 56:bc5345bc6650 976 {
thomasmorris 56:bc5345bc6650 977 _Orange_List_Edge[_Orange_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 978 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 979 }
thomasmorris 56:bc5345bc6650 980 if(CubeMap[0][1][2] == Orange)
thomasmorris 56:bc5345bc6650 981 {
thomasmorris 56:bc5345bc6650 982 _Orange_List_Edge[_Orange_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 983 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 984 }
thomasmorris 56:bc5345bc6650 985 if(CubeMap[0][2][1] == Orange)
thomasmorris 56:bc5345bc6650 986 {
thomasmorris 56:bc5345bc6650 987 _Orange_List_Edge[_Orange_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 988 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 989 }
thomasmorris 56:bc5345bc6650 990 //Check Orange side
thomasmorris 56:bc5345bc6650 991 if(CubeMap[1][0][1] == Orange)
thomasmorris 56:bc5345bc6650 992 {
thomasmorris 56:bc5345bc6650 993 _Orange_List_Edge[_Orange_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 994 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 995 }
thomasmorris 56:bc5345bc6650 996 if(CubeMap[1][1][0] == Orange)
thomasmorris 56:bc5345bc6650 997 {
thomasmorris 56:bc5345bc6650 998 _Orange_List_Edge[_Orange_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 999 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1000 }
thomasmorris 56:bc5345bc6650 1001 if(CubeMap[1][1][2] == Orange)
thomasmorris 56:bc5345bc6650 1002 {
thomasmorris 56:bc5345bc6650 1003 _Orange_List_Edge[_Orange_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1004 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1005 }
thomasmorris 56:bc5345bc6650 1006 if(CubeMap[1][2][1] == Orange)
thomasmorris 56:bc5345bc6650 1007 {
thomasmorris 56:bc5345bc6650 1008 _Orange_List_Edge[_Orange_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1009 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1010 }
thomasmorris 56:bc5345bc6650 1011 //Check Blue side
thomasmorris 56:bc5345bc6650 1012 if(CubeMap[2][0][1] == Orange)
thomasmorris 56:bc5345bc6650 1013 {
thomasmorris 56:bc5345bc6650 1014 _Orange_List_Edge[_Orange_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1015 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1016 }
thomasmorris 56:bc5345bc6650 1017 if(CubeMap[2][1][0] == Orange)
thomasmorris 56:bc5345bc6650 1018 {
thomasmorris 56:bc5345bc6650 1019 _Orange_List_Edge[_Orange_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1020 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1021 }
thomasmorris 56:bc5345bc6650 1022 if(CubeMap[2][1][2] == Orange)
thomasmorris 56:bc5345bc6650 1023 {
thomasmorris 56:bc5345bc6650 1024 _Orange_List_Edge[_Orange_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1025 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1026 }
thomasmorris 56:bc5345bc6650 1027 if(CubeMap[2][2][1] == Orange)
thomasmorris 56:bc5345bc6650 1028 {
thomasmorris 56:bc5345bc6650 1029 _Orange_List_Edge[_Orange_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1030 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1031 }
thomasmorris 56:bc5345bc6650 1032 //Check Red side
thomasmorris 56:bc5345bc6650 1033 if(CubeMap[3][0][1] == Orange)
thomasmorris 56:bc5345bc6650 1034 {
thomasmorris 56:bc5345bc6650 1035 _Orange_List_Edge[_Orange_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1036 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1037 }
thomasmorris 56:bc5345bc6650 1038 if(CubeMap[3][1][0] == Orange)
thomasmorris 56:bc5345bc6650 1039 {
thomasmorris 56:bc5345bc6650 1040 _Orange_List_Edge[_Orange_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1041 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1042 }
thomasmorris 56:bc5345bc6650 1043 if(CubeMap[3][1][2] == Orange)
thomasmorris 56:bc5345bc6650 1044 {
thomasmorris 56:bc5345bc6650 1045 _Orange_List_Edge[_Orange_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1046 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1047 }
thomasmorris 56:bc5345bc6650 1048 if(CubeMap[3][2][1] == Orange)
thomasmorris 56:bc5345bc6650 1049 {
thomasmorris 56:bc5345bc6650 1050 _Orange_List_Edge[_Orange_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1051 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1052 }
thomasmorris 56:bc5345bc6650 1053 //Check Green side
thomasmorris 56:bc5345bc6650 1054 if(CubeMap[4][0][1] == Orange)
thomasmorris 56:bc5345bc6650 1055 {
thomasmorris 56:bc5345bc6650 1056 _Orange_List_Edge[_Orange_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1057 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1058 }
thomasmorris 56:bc5345bc6650 1059 if(CubeMap[4][1][0] == Orange)
thomasmorris 56:bc5345bc6650 1060 {
thomasmorris 56:bc5345bc6650 1061 _Orange_List_Edge[_Orange_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1062 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1063 }
thomasmorris 56:bc5345bc6650 1064 if(CubeMap[4][1][2] == Orange)
thomasmorris 56:bc5345bc6650 1065 {
thomasmorris 56:bc5345bc6650 1066 _Orange_List_Edge[_Orange_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1067 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1068 }
thomasmorris 56:bc5345bc6650 1069 if(CubeMap[4][2][1] == Orange)
thomasmorris 56:bc5345bc6650 1070 {
thomasmorris 56:bc5345bc6650 1071 _Orange_List_Edge[_Orange_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1072 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1073 }
thomasmorris 56:bc5345bc6650 1074 //Check Yellow side
thomasmorris 56:bc5345bc6650 1075 if(CubeMap[5][0][1] == Orange)
thomasmorris 56:bc5345bc6650 1076 {
thomasmorris 56:bc5345bc6650 1077 _Orange_List_Edge[_Orange_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1078 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1079 }
thomasmorris 56:bc5345bc6650 1080 if(CubeMap[5][1][0] == Orange)
thomasmorris 56:bc5345bc6650 1081 {
thomasmorris 56:bc5345bc6650 1082 _Orange_List_Edge[_Orange_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1083 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1084 }
thomasmorris 56:bc5345bc6650 1085 if(CubeMap[5][1][2] == Orange)
thomasmorris 56:bc5345bc6650 1086 {
thomasmorris 56:bc5345bc6650 1087 _Orange_List_Edge[_Orange_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1088 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1089 }
thomasmorris 56:bc5345bc6650 1090 if(CubeMap[5][2][1] == Orange)
thomasmorris 56:bc5345bc6650 1091 {
thomasmorris 56:bc5345bc6650 1092 _Orange_List_Edge[_Orange_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1093 _Orange_Pointer_Edge = _Orange_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1094 }
thomasmorris 56:bc5345bc6650 1095 }
thomasmorris 56:bc5345bc6650 1096 void ALGORITHM::_Find_edges_Blue()//Identify White edges
thomasmorris 56:bc5345bc6650 1097 {
thomasmorris 56:bc5345bc6650 1098 //Check White side
thomasmorris 56:bc5345bc6650 1099 if(CubeMap[0][0][1] == Blue)
thomasmorris 56:bc5345bc6650 1100 {
thomasmorris 56:bc5345bc6650 1101 _Blue_List_Edge[_Blue_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1102 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1103 }
thomasmorris 56:bc5345bc6650 1104 if(CubeMap[0][1][0] == Blue)
thomasmorris 56:bc5345bc6650 1105 {
thomasmorris 56:bc5345bc6650 1106 _Blue_List_Edge[_Blue_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1107 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1108 }
thomasmorris 56:bc5345bc6650 1109 if(CubeMap[0][1][2] == Blue)
thomasmorris 56:bc5345bc6650 1110 {
thomasmorris 56:bc5345bc6650 1111 _Blue_List_Edge[_Blue_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1112 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1113 }
thomasmorris 56:bc5345bc6650 1114 if(CubeMap[0][2][1] == Blue)
thomasmorris 56:bc5345bc6650 1115 {
thomasmorris 56:bc5345bc6650 1116 _Blue_List_Edge[_Blue_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1117 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1118 }
thomasmorris 56:bc5345bc6650 1119 //Check Orange side
thomasmorris 56:bc5345bc6650 1120 if(CubeMap[1][0][1] == Blue)
thomasmorris 56:bc5345bc6650 1121 {
thomasmorris 56:bc5345bc6650 1122 _Blue_List_Edge[_Blue_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1123 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1124 }
thomasmorris 56:bc5345bc6650 1125 if(CubeMap[1][1][0] == Blue)
thomasmorris 56:bc5345bc6650 1126 {
thomasmorris 56:bc5345bc6650 1127 _Blue_List_Edge[_Blue_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1128 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1129 }
thomasmorris 56:bc5345bc6650 1130 if(CubeMap[1][1][2] == Blue)
thomasmorris 56:bc5345bc6650 1131 {
thomasmorris 56:bc5345bc6650 1132 _Blue_List_Edge[_Blue_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1133 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1134 }
thomasmorris 56:bc5345bc6650 1135 if(CubeMap[1][2][1] == Blue)
thomasmorris 56:bc5345bc6650 1136 {
thomasmorris 56:bc5345bc6650 1137 _Blue_List_Edge[_Blue_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1138 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1139 }
thomasmorris 56:bc5345bc6650 1140 //Check Blue side
thomasmorris 56:bc5345bc6650 1141 if(CubeMap[2][0][1] == Blue)
thomasmorris 56:bc5345bc6650 1142 {
thomasmorris 56:bc5345bc6650 1143 _Blue_List_Edge[_Blue_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1144 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1145 }
thomasmorris 56:bc5345bc6650 1146 if(CubeMap[2][1][0] == Blue)
thomasmorris 56:bc5345bc6650 1147 {
thomasmorris 56:bc5345bc6650 1148 _Blue_List_Edge[_Blue_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1149 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1150 }
thomasmorris 56:bc5345bc6650 1151 if(CubeMap[2][1][2] == Blue)
thomasmorris 56:bc5345bc6650 1152 {
thomasmorris 56:bc5345bc6650 1153 _Blue_List_Edge[_Blue_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1154 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1155 }
thomasmorris 56:bc5345bc6650 1156 if(CubeMap[2][2][1] == Blue)
thomasmorris 56:bc5345bc6650 1157 {
thomasmorris 56:bc5345bc6650 1158 _Blue_List_Edge[_Blue_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1159 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1160 }
thomasmorris 56:bc5345bc6650 1161 //Check Red side
thomasmorris 56:bc5345bc6650 1162 if(CubeMap[3][0][1] == Blue)
thomasmorris 56:bc5345bc6650 1163 {
thomasmorris 56:bc5345bc6650 1164 _Blue_List_Edge[_Blue_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1165 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1166 }
thomasmorris 56:bc5345bc6650 1167 if(CubeMap[3][1][0] == Blue)
thomasmorris 56:bc5345bc6650 1168 {
thomasmorris 56:bc5345bc6650 1169 _Blue_List_Edge[_Blue_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1170 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1171 }
thomasmorris 56:bc5345bc6650 1172 if(CubeMap[3][1][2] == Blue)
thomasmorris 56:bc5345bc6650 1173 {
thomasmorris 56:bc5345bc6650 1174 _Blue_List_Edge[_Blue_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1175 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1176 }
thomasmorris 56:bc5345bc6650 1177 if(CubeMap[3][2][1] == Blue)
thomasmorris 56:bc5345bc6650 1178 {
thomasmorris 56:bc5345bc6650 1179 _Blue_List_Edge[_Blue_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1180 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1181 }
thomasmorris 56:bc5345bc6650 1182 //Check Green side
thomasmorris 56:bc5345bc6650 1183 if(CubeMap[4][0][1] == Blue)
thomasmorris 56:bc5345bc6650 1184 {
thomasmorris 56:bc5345bc6650 1185 _Blue_List_Edge[_Blue_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1186 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1187 }
thomasmorris 56:bc5345bc6650 1188 if(CubeMap[4][1][0] == Blue)
thomasmorris 56:bc5345bc6650 1189 {
thomasmorris 56:bc5345bc6650 1190 _Blue_List_Edge[_Blue_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1191 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1192 }
thomasmorris 56:bc5345bc6650 1193 if(CubeMap[4][1][2] == Blue)
thomasmorris 56:bc5345bc6650 1194 {
thomasmorris 56:bc5345bc6650 1195 _Blue_List_Edge[_Blue_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1196 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1197 }
thomasmorris 56:bc5345bc6650 1198 if(CubeMap[4][2][1] == Blue)
thomasmorris 56:bc5345bc6650 1199 {
thomasmorris 56:bc5345bc6650 1200 _Blue_List_Edge[_Blue_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1201 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1202 }
thomasmorris 56:bc5345bc6650 1203 //Check Yellow side
thomasmorris 56:bc5345bc6650 1204 if(CubeMap[5][0][1] == Blue)
thomasmorris 56:bc5345bc6650 1205 {
thomasmorris 56:bc5345bc6650 1206 _Blue_List_Edge[_Blue_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1207 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1208 }
thomasmorris 56:bc5345bc6650 1209 if(CubeMap[5][1][0] == Blue)
thomasmorris 56:bc5345bc6650 1210 {
thomasmorris 56:bc5345bc6650 1211 _Blue_List_Edge[_Blue_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1212 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1213 }
thomasmorris 56:bc5345bc6650 1214 if(CubeMap[5][1][2] == Blue)
thomasmorris 56:bc5345bc6650 1215 {
thomasmorris 56:bc5345bc6650 1216 _Blue_List_Edge[_Blue_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1217 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1218 }
thomasmorris 56:bc5345bc6650 1219 if(CubeMap[5][2][1] == Blue)
thomasmorris 56:bc5345bc6650 1220 {
thomasmorris 56:bc5345bc6650 1221 _Blue_List_Edge[_Blue_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1222 _Blue_Pointer_Edge = _Blue_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1223 }
thomasmorris 56:bc5345bc6650 1224 }
thomasmorris 56:bc5345bc6650 1225 void ALGORITHM::_Find_edges_Red()//Identify Red edges
thomasmorris 56:bc5345bc6650 1226 {
thomasmorris 56:bc5345bc6650 1227 //Check White side
thomasmorris 56:bc5345bc6650 1228 if(CubeMap[0][0][1] == Red)
thomasmorris 56:bc5345bc6650 1229 {
thomasmorris 56:bc5345bc6650 1230 _Red_List_Edge[_Red_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1231 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1232 }
thomasmorris 56:bc5345bc6650 1233 if(CubeMap[0][1][0] == Red)
thomasmorris 56:bc5345bc6650 1234 {
thomasmorris 56:bc5345bc6650 1235 _Red_List_Edge[_Red_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1236 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1237 }
thomasmorris 56:bc5345bc6650 1238 if(CubeMap[0][1][2] == Red)
thomasmorris 56:bc5345bc6650 1239 {
thomasmorris 56:bc5345bc6650 1240 _Red_List_Edge[_Red_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1241 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1242 }
thomasmorris 56:bc5345bc6650 1243 if(CubeMap[0][2][1] == Red)
thomasmorris 56:bc5345bc6650 1244 {
thomasmorris 56:bc5345bc6650 1245 _Red_List_Edge[_Red_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1246 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1247 }
thomasmorris 56:bc5345bc6650 1248 //Check Orange side
thomasmorris 56:bc5345bc6650 1249 if(CubeMap[1][0][1] == Red)
thomasmorris 56:bc5345bc6650 1250 {
thomasmorris 56:bc5345bc6650 1251 _Red_List_Edge[_Red_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1252 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1253 }
thomasmorris 56:bc5345bc6650 1254 if(CubeMap[1][1][0] == Red)
thomasmorris 56:bc5345bc6650 1255 {
thomasmorris 56:bc5345bc6650 1256 _Red_List_Edge[_Red_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1257 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1258 }
thomasmorris 56:bc5345bc6650 1259 if(CubeMap[1][1][2] == Red)
thomasmorris 56:bc5345bc6650 1260 {
thomasmorris 56:bc5345bc6650 1261 _Red_List_Edge[_Red_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1262 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1263 }
thomasmorris 56:bc5345bc6650 1264 if(CubeMap[1][2][1] == Red)
thomasmorris 56:bc5345bc6650 1265 {
thomasmorris 56:bc5345bc6650 1266 _Red_List_Edge[_Red_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1267 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1268 }
thomasmorris 56:bc5345bc6650 1269 //Check Blue side
thomasmorris 56:bc5345bc6650 1270 if(CubeMap[2][0][1] == Red)
thomasmorris 56:bc5345bc6650 1271 {
thomasmorris 56:bc5345bc6650 1272 _Red_List_Edge[_Red_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1273 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1274 }
thomasmorris 56:bc5345bc6650 1275 if(CubeMap[2][1][0] == Red)
thomasmorris 56:bc5345bc6650 1276 {
thomasmorris 56:bc5345bc6650 1277 _Red_List_Edge[_Red_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1278 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1279 }
thomasmorris 56:bc5345bc6650 1280 if(CubeMap[2][1][2] == Red)
thomasmorris 56:bc5345bc6650 1281 {
thomasmorris 56:bc5345bc6650 1282 _Red_List_Edge[_Red_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1283 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1284 }
thomasmorris 56:bc5345bc6650 1285 if(CubeMap[2][2][1] == Red)
thomasmorris 56:bc5345bc6650 1286 {
thomasmorris 56:bc5345bc6650 1287 _Red_List_Edge[_Red_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1288 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1289 }
thomasmorris 56:bc5345bc6650 1290 //Check Red side
thomasmorris 56:bc5345bc6650 1291 if(CubeMap[3][0][1] == Red)
thomasmorris 56:bc5345bc6650 1292 {
thomasmorris 56:bc5345bc6650 1293 _Red_List_Edge[_Red_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1294 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1295 }
thomasmorris 56:bc5345bc6650 1296 if(CubeMap[3][1][0] == Red)
thomasmorris 56:bc5345bc6650 1297 {
thomasmorris 56:bc5345bc6650 1298 _Red_List_Edge[_Red_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1299 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1300 }
thomasmorris 56:bc5345bc6650 1301 if(CubeMap[3][1][2] == Red)
thomasmorris 56:bc5345bc6650 1302 {
thomasmorris 56:bc5345bc6650 1303 _Red_List_Edge[_Red_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1304 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1305 }
thomasmorris 56:bc5345bc6650 1306 if(CubeMap[3][2][1] == Red)
thomasmorris 56:bc5345bc6650 1307 {
thomasmorris 56:bc5345bc6650 1308 _Red_List_Edge[_Red_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1309 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1310 }
thomasmorris 56:bc5345bc6650 1311 //Check Green side
thomasmorris 56:bc5345bc6650 1312 if(CubeMap[4][0][1] == Red)
thomasmorris 56:bc5345bc6650 1313 {
thomasmorris 56:bc5345bc6650 1314 _Red_List_Edge[_Red_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1315 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1316 }
thomasmorris 56:bc5345bc6650 1317 if(CubeMap[4][1][0] == Red)
thomasmorris 56:bc5345bc6650 1318 {
thomasmorris 56:bc5345bc6650 1319 _Red_List_Edge[_Red_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1320 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1321 }
thomasmorris 56:bc5345bc6650 1322 if(CubeMap[4][1][2] == Red)
thomasmorris 56:bc5345bc6650 1323 {
thomasmorris 56:bc5345bc6650 1324 _Red_List_Edge[_Red_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1325 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1326 }
thomasmorris 56:bc5345bc6650 1327 if(CubeMap[4][2][1] == Red)
thomasmorris 56:bc5345bc6650 1328 {
thomasmorris 56:bc5345bc6650 1329 _Red_List_Edge[_Red_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1330 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1331 }
thomasmorris 56:bc5345bc6650 1332 //Check Yellow side
thomasmorris 56:bc5345bc6650 1333 if(CubeMap[5][0][1] == Red)
thomasmorris 56:bc5345bc6650 1334 {
thomasmorris 56:bc5345bc6650 1335 _Red_List_Edge[_Red_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1336 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1337 }
thomasmorris 56:bc5345bc6650 1338 if(CubeMap[5][1][0] == Red)
thomasmorris 56:bc5345bc6650 1339 {
thomasmorris 56:bc5345bc6650 1340 _Red_List_Edge[_Red_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1341 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1342 }
thomasmorris 56:bc5345bc6650 1343 if(CubeMap[5][1][2] == Red)
thomasmorris 56:bc5345bc6650 1344 {
thomasmorris 56:bc5345bc6650 1345 _Red_List_Edge[_Red_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1346 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1347 }
thomasmorris 56:bc5345bc6650 1348 if(CubeMap[5][2][1] == Red)
thomasmorris 56:bc5345bc6650 1349 {
thomasmorris 56:bc5345bc6650 1350 _Red_List_Edge[_Red_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1351 _Red_Pointer_Edge = _Red_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1352 }
thomasmorris 56:bc5345bc6650 1353 }
thomasmorris 56:bc5345bc6650 1354 void ALGORITHM::_Find_edges_Green()//Identify Green edges
thomasmorris 56:bc5345bc6650 1355 {
thomasmorris 56:bc5345bc6650 1356 //Check White side
thomasmorris 56:bc5345bc6650 1357 if(CubeMap[0][0][1] == Green)
thomasmorris 56:bc5345bc6650 1358 {
thomasmorris 56:bc5345bc6650 1359 _Green_List_Edge[_Green_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1360 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1361 }
thomasmorris 56:bc5345bc6650 1362 if(CubeMap[0][1][0] == Green)
thomasmorris 56:bc5345bc6650 1363 {
thomasmorris 56:bc5345bc6650 1364 _Green_List_Edge[_Green_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1365 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1366 }
thomasmorris 56:bc5345bc6650 1367 if(CubeMap[0][1][2] == Green)
thomasmorris 56:bc5345bc6650 1368 {
thomasmorris 56:bc5345bc6650 1369 _Green_List_Edge[_Green_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1370 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1371 }
thomasmorris 56:bc5345bc6650 1372 if(CubeMap[0][2][1] == Green)
thomasmorris 56:bc5345bc6650 1373 {
thomasmorris 56:bc5345bc6650 1374 _Green_List_Edge[_Green_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1375 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1376 }
thomasmorris 56:bc5345bc6650 1377 //Check Orange side
thomasmorris 56:bc5345bc6650 1378 if(CubeMap[1][0][1] == Green)
thomasmorris 56:bc5345bc6650 1379 {
thomasmorris 56:bc5345bc6650 1380 _Green_List_Edge[_Green_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1381 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1382 }
thomasmorris 56:bc5345bc6650 1383 if(CubeMap[1][1][0] == Green)
thomasmorris 56:bc5345bc6650 1384 {
thomasmorris 56:bc5345bc6650 1385 _Green_List_Edge[_Green_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1386 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1387 }
thomasmorris 56:bc5345bc6650 1388 if(CubeMap[1][1][2] == Green)
thomasmorris 56:bc5345bc6650 1389 {
thomasmorris 56:bc5345bc6650 1390 _Green_List_Edge[_Green_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1391 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1392 }
thomasmorris 56:bc5345bc6650 1393 if(CubeMap[1][2][1] == Green)
thomasmorris 56:bc5345bc6650 1394 {
thomasmorris 56:bc5345bc6650 1395 _Green_List_Edge[_Green_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1396 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1397 }
thomasmorris 56:bc5345bc6650 1398 //Check Blue side
thomasmorris 56:bc5345bc6650 1399 if(CubeMap[2][0][1] == Green)
thomasmorris 56:bc5345bc6650 1400 {
thomasmorris 56:bc5345bc6650 1401 _Green_List_Edge[_Green_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1402 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1403 }
thomasmorris 56:bc5345bc6650 1404 if(CubeMap[2][1][0] == Green)
thomasmorris 56:bc5345bc6650 1405 {
thomasmorris 56:bc5345bc6650 1406 _Green_List_Edge[_Green_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1407 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1408 }
thomasmorris 56:bc5345bc6650 1409 if(CubeMap[2][1][2] == Green)
thomasmorris 56:bc5345bc6650 1410 {
thomasmorris 56:bc5345bc6650 1411 _Green_List_Edge[_Green_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1412 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1413 }
thomasmorris 56:bc5345bc6650 1414 if(CubeMap[2][2][1] == Green)
thomasmorris 56:bc5345bc6650 1415 {
thomasmorris 56:bc5345bc6650 1416 _Green_List_Edge[_Green_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1417 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1418 }
thomasmorris 56:bc5345bc6650 1419 //Check Red side
thomasmorris 56:bc5345bc6650 1420 if(CubeMap[3][0][1] == Green)
thomasmorris 56:bc5345bc6650 1421 {
thomasmorris 56:bc5345bc6650 1422 _Green_List_Edge[_Green_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1423 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1424 }
thomasmorris 56:bc5345bc6650 1425 if(CubeMap[3][1][0] == Green)
thomasmorris 56:bc5345bc6650 1426 {
thomasmorris 56:bc5345bc6650 1427 _Green_List_Edge[_Green_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1428 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1429 }
thomasmorris 56:bc5345bc6650 1430 if(CubeMap[3][1][2] == Green)
thomasmorris 56:bc5345bc6650 1431 {
thomasmorris 56:bc5345bc6650 1432 _Green_List_Edge[_Green_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1433 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1434 }
thomasmorris 56:bc5345bc6650 1435 if(CubeMap[3][2][1] == Green)
thomasmorris 56:bc5345bc6650 1436 {
thomasmorris 56:bc5345bc6650 1437 _Green_List_Edge[_Green_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1438 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1439 }
thomasmorris 56:bc5345bc6650 1440 //Check Green side
thomasmorris 56:bc5345bc6650 1441 if(CubeMap[4][0][1] == Green)
thomasmorris 56:bc5345bc6650 1442 {
thomasmorris 56:bc5345bc6650 1443 _Green_List_Edge[_Green_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1444 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1445 }
thomasmorris 56:bc5345bc6650 1446 if(CubeMap[4][1][0] == Green)
thomasmorris 56:bc5345bc6650 1447 {
thomasmorris 56:bc5345bc6650 1448 _Green_List_Edge[_Green_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1449 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1450 }
thomasmorris 56:bc5345bc6650 1451 if(CubeMap[4][1][2] == Green)
thomasmorris 56:bc5345bc6650 1452 {
thomasmorris 56:bc5345bc6650 1453 _Green_List_Edge[_Green_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1454 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1455 }
thomasmorris 56:bc5345bc6650 1456 if(CubeMap[4][2][1] == Green)
thomasmorris 56:bc5345bc6650 1457 {
thomasmorris 56:bc5345bc6650 1458 _Green_List_Edge[_Green_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1459 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1460 }
thomasmorris 56:bc5345bc6650 1461 //Check Yellow side
thomasmorris 56:bc5345bc6650 1462 if(CubeMap[5][0][1] == Green)
thomasmorris 56:bc5345bc6650 1463 {
thomasmorris 56:bc5345bc6650 1464 _Green_List_Edge[_Green_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1465 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1466 }
thomasmorris 56:bc5345bc6650 1467 if(CubeMap[5][1][0] == Green)
thomasmorris 56:bc5345bc6650 1468 {
thomasmorris 56:bc5345bc6650 1469 _Green_List_Edge[_Green_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1470 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1471 }
thomasmorris 56:bc5345bc6650 1472 if(CubeMap[5][1][2] == Green)
thomasmorris 56:bc5345bc6650 1473 {
thomasmorris 56:bc5345bc6650 1474 _Green_List_Edge[_Green_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1475 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1476 }
thomasmorris 56:bc5345bc6650 1477 if(CubeMap[5][2][1] == Green)
thomasmorris 56:bc5345bc6650 1478 {
thomasmorris 56:bc5345bc6650 1479 _Green_List_Edge[_Green_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1480 _Green_Pointer_Edge = _Green_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1481 }
thomasmorris 56:bc5345bc6650 1482 }
thomasmorris 56:bc5345bc6650 1483 void ALGORITHM::_Find_edges_Yellow()//Identify Yellow edges
thomasmorris 56:bc5345bc6650 1484 {
thomasmorris 56:bc5345bc6650 1485 //Check White side
thomasmorris 56:bc5345bc6650 1486 if(CubeMap[0][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 1487 {
thomasmorris 56:bc5345bc6650 1488 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1489 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1490 }
thomasmorris 56:bc5345bc6650 1491 if(CubeMap[0][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 1492 {
thomasmorris 56:bc5345bc6650 1493 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1494 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1495 }
thomasmorris 56:bc5345bc6650 1496 if(CubeMap[0][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 1497 {
thomasmorris 56:bc5345bc6650 1498 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1499 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1500 }
thomasmorris 56:bc5345bc6650 1501 if(CubeMap[0][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 1502 {
thomasmorris 56:bc5345bc6650 1503 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1504 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1505 }
thomasmorris 56:bc5345bc6650 1506 //Check Orange side
thomasmorris 56:bc5345bc6650 1507 if(CubeMap[1][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 1508 {
thomasmorris 56:bc5345bc6650 1509 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1510 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1511 }
thomasmorris 56:bc5345bc6650 1512 if(CubeMap[1][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 1513 {
thomasmorris 56:bc5345bc6650 1514 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1515 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1516 }
thomasmorris 56:bc5345bc6650 1517 if(CubeMap[1][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 1518 {
thomasmorris 56:bc5345bc6650 1519 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1520 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1521 }
thomasmorris 56:bc5345bc6650 1522 if(CubeMap[1][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 1523 {
thomasmorris 56:bc5345bc6650 1524 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1525 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1526 }
thomasmorris 56:bc5345bc6650 1527 //Check Blue side
thomasmorris 56:bc5345bc6650 1528 if(CubeMap[2][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 1529 {
thomasmorris 56:bc5345bc6650 1530 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1531 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1532 }
thomasmorris 56:bc5345bc6650 1533 if(CubeMap[2][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 1534 {
thomasmorris 56:bc5345bc6650 1535 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1536 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1537 }
thomasmorris 56:bc5345bc6650 1538 if(CubeMap[2][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 1539 {
thomasmorris 56:bc5345bc6650 1540 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1541 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1542 }
thomasmorris 56:bc5345bc6650 1543 if(CubeMap[2][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 1544 {
thomasmorris 56:bc5345bc6650 1545 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1546 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1547 }
thomasmorris 56:bc5345bc6650 1548 //Check Red side
thomasmorris 56:bc5345bc6650 1549 if(CubeMap[3][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 1550 {
thomasmorris 56:bc5345bc6650 1551 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1552 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1553 }
thomasmorris 56:bc5345bc6650 1554 if(CubeMap[3][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 1555 {
thomasmorris 56:bc5345bc6650 1556 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1557 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1558 }
thomasmorris 56:bc5345bc6650 1559 if(CubeMap[3][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 1560 {
thomasmorris 56:bc5345bc6650 1561 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1562 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1563 }
thomasmorris 56:bc5345bc6650 1564 if(CubeMap[3][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 1565 {
thomasmorris 56:bc5345bc6650 1566 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1567 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1568 }
thomasmorris 56:bc5345bc6650 1569 //Check Green side
thomasmorris 56:bc5345bc6650 1570 if(CubeMap[4][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 1571 {
thomasmorris 56:bc5345bc6650 1572 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1573 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1574 }
thomasmorris 56:bc5345bc6650 1575 if(CubeMap[4][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 1576 {
thomasmorris 56:bc5345bc6650 1577 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1578 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1579 }
thomasmorris 56:bc5345bc6650 1580 if(CubeMap[4][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 1581 {
thomasmorris 56:bc5345bc6650 1582 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1583 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1584 }
thomasmorris 56:bc5345bc6650 1585 if(CubeMap[4][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 1586 {
thomasmorris 56:bc5345bc6650 1587 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1588 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1589 }
thomasmorris 56:bc5345bc6650 1590 //Check Yellow side
thomasmorris 56:bc5345bc6650 1591 if(CubeMap[5][0][1] == Yellow)
thomasmorris 56:bc5345bc6650 1592 {
thomasmorris 56:bc5345bc6650 1593 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 2;//Store this internal variable
thomasmorris 56:bc5345bc6650 1594 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1595 }
thomasmorris 56:bc5345bc6650 1596 if(CubeMap[5][1][0] == Yellow)
thomasmorris 56:bc5345bc6650 1597 {
thomasmorris 56:bc5345bc6650 1598 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 4;//Store this internal variable
thomasmorris 56:bc5345bc6650 1599 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1600 }
thomasmorris 56:bc5345bc6650 1601 if(CubeMap[5][1][2] == Yellow)
thomasmorris 56:bc5345bc6650 1602 {
thomasmorris 56:bc5345bc6650 1603 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 6;//Store this internal variable
thomasmorris 56:bc5345bc6650 1604 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1605 }
thomasmorris 56:bc5345bc6650 1606 if(CubeMap[5][2][1] == Yellow)
thomasmorris 56:bc5345bc6650 1607 {
thomasmorris 56:bc5345bc6650 1608 _Yellow_List_Edge[_Yellow_Pointer_Edge] = 8;//Store this internal variable
thomasmorris 56:bc5345bc6650 1609 _Yellow_Pointer_Edge = _Yellow_Pointer_Edge + 1;
thomasmorris 56:bc5345bc6650 1610 }
thomasmorris 56:bc5345bc6650 1611 }
thomasmorris 56:bc5345bc6650 1612
thomasmorris 56:bc5345bc6650 1613
thomasmorris 56:bc5345bc6650 1614 //Forward Declaration of the functions
thomasmorris 56:bc5345bc6650 1615 SIDE::SIDE()//Constructor
thomasmorris 56:bc5345bc6650 1616 {
thomasmorris 56:bc5345bc6650 1617 _Cubelet_1_position = 1;
thomasmorris 56:bc5345bc6650 1618 _Cubelet_2_position = 2;
thomasmorris 56:bc5345bc6650 1619 _Cubelet_3_position = 3;
thomasmorris 56:bc5345bc6650 1620 _Cubelet_4_position = 4;
thomasmorris 56:bc5345bc6650 1621 _Cubelet_5_position = 5;
thomasmorris 56:bc5345bc6650 1622 _Cubelet_6_position = 6;
thomasmorris 56:bc5345bc6650 1623 _Cubelet_7_position = 7;
thomasmorris 56:bc5345bc6650 1624 _Cubelet_8_position = 8;
thomasmorris 56:bc5345bc6650 1625 _Cubelet_9_position = 9;
thomasmorris 56:bc5345bc6650 1626
thomasmorris 56:bc5345bc6650 1627 _Cubelet_1_colour = 0;
thomasmorris 56:bc5345bc6650 1628 _Cubelet_2_colour = 0;
thomasmorris 56:bc5345bc6650 1629 _Cubelet_3_colour = 0;
thomasmorris 56:bc5345bc6650 1630 _Cubelet_4_colour = 0;
thomasmorris 56:bc5345bc6650 1631 _Cubelet_5_colour = 0;
thomasmorris 56:bc5345bc6650 1632 _Cubelet_6_colour = 0;
thomasmorris 56:bc5345bc6650 1633 _Cubelet_7_colour = 0;
thomasmorris 56:bc5345bc6650 1634 _Cubelet_8_colour = 0;
thomasmorris 56:bc5345bc6650 1635 _Cubelet_9_colour = 0;
thomasmorris 56:bc5345bc6650 1636 }
thomasmorris 56:bc5345bc6650 1637 SIDE::~SIDE()//Destructor
thomasmorris 56:bc5345bc6650 1638 {
thomasmorris 56:bc5345bc6650 1639
thomasmorris 56:bc5345bc6650 1640 }
thomasmorris 56:bc5345bc6650 1641
thomasmorris 56:bc5345bc6650 1642
thomasmorris 56:bc5345bc6650 1643 int SIDE::SIDE_type()
thomasmorris 56:bc5345bc6650 1644 {
thomasmorris 56:bc5345bc6650 1645 return _Cubelet_5_colour;
thomasmorris 56:bc5345bc6650 1646 }
thomasmorris 56:bc5345bc6650 1647 void SIDE::Set_Colours(int CP1,int CP2,int CP3,int CP4,int CP5,int CP6,int CP7,int CP8,int CP9)
thomasmorris 56:bc5345bc6650 1648 {
thomasmorris 56:bc5345bc6650 1649 _Cubelet_1_colour = CP1;
thomasmorris 56:bc5345bc6650 1650 _Cubelet_2_colour = CP2;
thomasmorris 56:bc5345bc6650 1651 _Cubelet_3_colour = CP3;
thomasmorris 56:bc5345bc6650 1652 _Cubelet_4_colour = CP4;
thomasmorris 56:bc5345bc6650 1653 _Cubelet_5_colour = CP5;
thomasmorris 56:bc5345bc6650 1654 _Cubelet_6_colour = CP6;
thomasmorris 56:bc5345bc6650 1655 _Cubelet_7_colour = CP7;
thomasmorris 56:bc5345bc6650 1656 _Cubelet_8_colour = CP8;
thomasmorris 56:bc5345bc6650 1657 _Cubelet_9_colour = CP9;
thomasmorris 56:bc5345bc6650 1658 }