1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
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
|
import static org.distorted.objectlib.main.TwistyObject.SQ6;
|
14
|
|
15
|
import android.content.res.Resources;
|
16
|
|
17
|
import org.distorted.library.type.Static3D;
|
18
|
import org.distorted.objectlib.R;
|
19
|
|
20
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
21
|
|
22
|
public class TablebasesSkewbDiamond extends TablebasesAbstract
|
23
|
{
|
24
|
public TablebasesSkewbDiamond()
|
25
|
{
|
26
|
super();
|
27
|
}
|
28
|
|
29
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
30
|
|
31
|
public TablebasesSkewbDiamond(Resources res)
|
32
|
{
|
33
|
super(res, R.raw.pyra_3_tablebase);
|
34
|
}
|
35
|
|
36
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
37
|
|
38
|
int[][] getBasicAngles()
|
39
|
{
|
40
|
int[] tmp = {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( SQ6/3, SQ3/3, 0),
|
51
|
new Static3D(-SQ6/3, SQ3/3, 0),
|
52
|
new Static3D( 0,-SQ3/3,-SQ6/3),
|
53
|
new Static3D( 0,-SQ3/3, SQ6/3)
|
54
|
};
|
55
|
}
|
56
|
|
57
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
58
|
|
59
|
float[][] getPosition()
|
60
|
{
|
61
|
return new float[][]
|
62
|
{
|
63
|
// TODO
|
64
|
};
|
65
|
}
|
66
|
|
67
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
68
|
|
69
|
float[][] getCuts()
|
70
|
{
|
71
|
float[] cut = { 0.0f };
|
72
|
return new float[][] { cut,cut,cut,cut };
|
73
|
}
|
74
|
|
75
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
76
|
|
77
|
boolean[][] getRotatable()
|
78
|
{
|
79
|
boolean[] tmp = new boolean[] {false,true};
|
80
|
return new boolean[][] { tmp,tmp,tmp,tmp };
|
81
|
}
|
82
|
|
83
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
84
|
// specifically for the tablebase
|
85
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
86
|
|
87
|
int getSize()
|
88
|
{
|
89
|
return 138240; // see https://www.jaapsch.net/puzzles/diamond.htm
|
90
|
}
|
91
|
|
92
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
93
|
|
94
|
public int[] getQuats(int index)
|
95
|
{
|
96
|
return null;
|
97
|
}
|
98
|
|
99
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
100
|
|
101
|
public int getIndex(int[] quats)
|
102
|
{
|
103
|
return 0;
|
104
|
}
|
105
|
}
|
106
|
|