1 |
76de8309
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2 |
|
|
// Copyright 2023 Leszek Koltunski //
|
3 |
|
|
// //
|
4 |
|
|
// This file is part of Magic Cube. //
|
5 |
|
|
// //
|
6 |
|
|
// Magic Cube is proprietary software licensed under an EULA which you should have received //
|
7 |
|
|
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html //
|
8 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
9 |
|
|
|
10 |
|
|
package org.distorted.objectlib.tablebases;
|
11 |
|
|
|
12 |
|
|
import static org.distorted.objectlib.main.TwistyObject.SQ3;
|
13 |
|
|
|
14 |
|
|
import android.content.res.Resources;
|
15 |
|
|
|
16 |
|
|
import org.distorted.library.type.Static3D;
|
17 |
|
|
|
18 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
19 |
|
|
|
20 |
|
|
public class TBDino6 extends TablebasesAbstract
|
21 |
|
|
{
|
22 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
23 |
|
|
|
24 |
|
|
public TBDino6()
|
25 |
|
|
{
|
26 |
|
|
super();
|
27 |
|
|
}
|
28 |
|
|
|
29 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
30 |
|
|
|
31 |
|
|
public TBDino6(Resources res)
|
32 |
|
|
{
|
33 |
|
|
super(res,org.distorted.objectlib.R.raw.pduo_2_tablebase);
|
34 |
|
|
}
|
35 |
|
|
|
36 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
37 |
|
|
|
38 |
|
|
int[][] getBasicAngles()
|
39 |
|
|
{
|
40 |
|
|
int[] tmp = {3,3,3};
|
41 |
|
|
return new int[][] { tmp,tmp,tmp,tmp };
|
42 |
|
|
}
|
43 |
|
|
|
44 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
45 |
|
|
|
46 |
|
|
Static3D[] getRotationAxis()
|
47 |
|
|
{
|
48 |
|
|
return new Static3D[]
|
49 |
|
|
{
|
50 |
|
|
new Static3D( SQ3/3, SQ3/3, SQ3/3),
|
51 |
|
|
new Static3D( SQ3/3, SQ3/3,-SQ3/3),
|
52 |
|
|
new Static3D( SQ3/3,-SQ3/3, SQ3/3),
|
53 |
|
|
new Static3D( SQ3/3,-SQ3/3,-SQ3/3)
|
54 |
|
|
};
|
55 |
|
|
}
|
56 |
|
|
|
57 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
58 |
|
|
|
59 |
|
|
float[][] getPosition()
|
60 |
|
|
{
|
61 |
|
|
return new float[][]
|
62 |
|
|
{
|
63 |
|
|
{ 0.0f, 1.5f, 1.5f },
|
64 |
|
|
{ 1.5f, 0.0f, 1.5f },
|
65 |
|
|
{ 0.0f,-1.5f, 1.5f },
|
66 |
|
|
{-1.5f, 0.0f, 1.5f },
|
67 |
|
|
{ 1.5f, 1.5f, 0.0f },
|
68 |
|
|
{ 1.5f,-1.5f, 0.0f },
|
69 |
|
|
{-1.5f,-1.5f, 0.0f },
|
70 |
|
|
{-1.5f, 1.5f, 0.0f },
|
71 |
|
|
{ 0.0f, 1.5f,-1.5f },
|
72 |
|
|
{ 1.5f, 0.0f,-1.5f },
|
73 |
|
|
{ 0.0f,-1.5f,-1.5f },
|
74 |
|
|
{-1.5f, 0.0f,-1.5f }
|
75 |
|
|
};
|
76 |
|
|
}
|
77 |
|
|
|
78 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
79 |
|
|
|
80 |
|
|
float[][] getCuts()
|
81 |
|
|
{
|
82 |
|
|
float[] cut = new float[] { -SQ3/3, SQ3/3 };
|
83 |
|
|
return new float[][] { cut,cut,cut,cut };
|
84 |
|
|
}
|
85 |
|
|
|
86 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
87 |
|
|
|
88 |
|
|
boolean[][] getRotatable()
|
89 |
|
|
{
|
90 |
|
|
boolean[] tmp = new boolean[] {true,false,true};
|
91 |
|
|
return new boolean[][] { tmp,tmp,tmp,tmp };
|
92 |
|
|
}
|
93 |
|
|
|
94 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
95 |
|
|
// specifically for the tablebase
|
96 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
97 |
|
|
|
98 |
|
|
int getSize()
|
99 |
|
|
{
|
100 |
|
|
return 19958400; // see https://www.jaapsch.net/puzzles/dinocube.htm
|
101 |
|
|
}
|
102 |
|
|
|
103 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
104 |
|
|
|
105 |
|
|
int getMinScramble()
|
106 |
|
|
{
|
107 |
|
|
return 9;
|
108 |
|
|
}
|
109 |
|
|
|
110 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
111 |
|
|
|
112 |
|
|
public static int getIndexFromPerm(int[] perm)
|
113 |
|
|
{
|
114 |
|
|
return 0;
|
115 |
|
|
}
|
116 |
|
|
|
117 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
118 |
|
|
|
119 |
|
|
int[] getQuats(int index)
|
120 |
|
|
{
|
121 |
|
|
return null;
|
122 |
|
|
}
|
123 |
|
|
|
124 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
125 |
|
|
|
126 |
|
|
int getIndex(int[] quats)
|
127 |
|
|
{
|
128 |
|
|
return 0;
|
129 |
|
|
}
|
130 |
|
|
}
|