In order to describe cube state we need to introduce orientation concept of pieces. Edge is in correct orientation if we can find sequence of moves that allows to insert one in correct place but not using two defined faces which are opposed to each other. Choice of opposed faces is unrestricted but remember that
In order to implement cube representation I will need to divide cube to few separate elements. Cube has twelve edges (two-color pieces) and eight corners (three-color pieces). Edges that we can specify: UF UL UB UR DF DL DB DR FL BL BR FR and this is possible corners: UFR UFL UBL UBR DFR DFL
I hope you have read my previous post. If no, it will be better if you do it before because code that we will write today will be better understood for you then. Article is also available in Polish version. Tests for HTM metric So, let’s start from HTM metric which is really simple metric.
After we created a scrambles generator, our next step is to create the classes responsible for measuring the length of scrambles. There are mainly two metrics: Quarter Turn Metric (QTM) Half Turn Metric (HTM) Half Turn Metric (HTM) – also called Face Turn Metric (FTM), is a metric for 3×3 cubes, where every movement of
In my previous article i described theory which is necessary to write generator of scrambling algorithms. Now it’s time to begin first lines of code. If you didn’t read mentioned theory, it will be the best option if you do it before because it will help you to understand code which will be written today.