1 #ifndef __PUZZLEFIELD__ 2 #define __PUZZLEFIELD__ 13 #define PUZZLE_POSITION_CURRENT 16 14 #define PUZZLE_POSITION_NEXT 16 15 #define PUZZLE_POSITION_DESTINATE 9 16 #define PUZZLE_POLAR_COODINATE 2 21 #define PUZZLE_LINE_LONG 1100 22 #define PUZZLE_LINE_NORMAL 920 23 #define PUZZLE_LINE_SHORT 660 24 #define PUZZLE_LINE_VERY_SHORT 345 31 void preparatePuzzle (
void ) ;
32 void testGame (
void ) ;
40 int modifiedSpinVector ;
41 int32_t modifiedSpinDegree ;
44 int32_t traceDistance ;
45 int32_t currentDegree ;
47 int8_t rightMotorDeg ;
48 int8_t connectNumber ;
49 int8_t beforeconnectNumber ;
50 int32_t beforeDegree ;
52 int32_t nextDistance ;
59 {
X,
X,
X,
X,
X,
X, 0,
X, 1, 2,
X,
X,
X, 3, 4, X },
60 {
X,
X, 0,
X,
X, 1,
X,
X,
X,
X, 2,
X,
X,
X,
X, X },
61 {
X, 0,
X, 1,
X, 2, 3,
X, 5,
X,
X,
X,
X,
X,
X, X },
62 {
X,
X, 0,
X, 1,
X, 2, 3,
X, 5,
X,
X,
X,
X,
X, X },
63 {
X,
X,
X, 0,
X,
X,
X, 1,
X,
X,
X, 2,
X,
X,
X, X },
64 {
X, 0, 1,
X,
X,
X, 4,
X, 2,
X, 3,
X, 5,
X,
X, X },
65 { 8,
X, 0, 1,
X, 4,
X, 5, 2, 3,
X,
X,
X, 6, 7, X },
66 {
X,
X,
X, 0, 1,
X, 4,
X,
X, 2,
X, 3,
X,
X,
X, 5 },
67 { 8,
X, 4,
X,
X, 0, 1,
X,
X, 5, 6,
X, 2, 3, 7, X },
68 { 8,
X,
X, 4,
X,
X, 0, 1, 5,
X,
X, 6,
X, 7, 2, 3 },
69 {
X, 0,
X,
X,
X, 1,
X,
X, 5,
X,
X,
X, 2,
X,
X, X },
70 {
X,
X,
X,
X, 0,
X,
X, 1,
X, 5,
X,
X,
X,
X,
X, 2 },
71 {
X,
X,
X,
X,
X, 5,
X,
X, 0,
X, 1,
X,
X, 2,
X, X },
72 { 7,
X,
X,
X,
X,
X, 5,
X, 0, 6,
X,
X, 1,
X, 2, X },
73 { 7,
X,
X,
X,
X,
X, 5,
X, 6, 0,
X,
X,
X, 1,
X, 2 },
74 {
X,
X,
X,
X,
X,
X,
X, 5,
X, 0,
X, 1,
X,
X, 2, X }
78 { 90,
PUZZLE_LINE_VERY_SHORT }, { 160,
PUZZLE_LINE_VERY_SHORT }, { 10,
PUZZLE_LINE_VERY_SHORT }, { -120,
PUZZLE_LINE_VERY_SHORT }, { -60,
PUZZLE_LINE_VERY_SHORT }, {
X, X }, {
X, X }, {
X, X }, {
X, X }
81 { 0,
PUZZLE_LINE_LONG }, { -30,
PUZZLE_LINE_SHORT }, { -75,
PUZZLE_LINE_NORMAL }, {
X, X }, {
X, X }, {
X, X }, {
X, X }, {
X, X }, {
X, X }
84 { 180,
PUZZLE_LINE_LONG }, { 0,
PUZZLE_LINE_LONG }, { -150,
PUZZLE_LINE_SHORT }, { -30,
PUZZLE_LINE_SHORT }, {
X, X }, { -90,
PUZZLE_LINE_SHORT }, {
X, X }, {
X, X }, {
X, X }
87 { 180,
PUZZLE_LINE_SHORT }, { 0,
PUZZLE_LINE_LONG }, { -150,
PUZZLE_LINE_SHORT }, { -30,
PUZZLE_LINE_SHORT }, {
X, X }, { -90,
PUZZLE_LINE_SHORT }, {
X, X }, {
X, X }, {
X, X }
90 { 180,
PUZZLE_LINE_LONG }, { -150,
PUZZLE_LINE_SHORT }, { -108,
PUZZLE_LINE_NORMAL }, {
X, X }, {
X, X }, {
X, X }, {
X, X }, {
X, X }, {
X, X }
93 { 150,
PUZZLE_LINE_SHORT }, { 30,
PUZZLE_LINE_SHORT }, { -30,
PUZZLE_LINE_SHORT }, { -120,
PUZZLE_LINE_SHORT }, { 0,
PUZZLE_LINE_LONG }, { -75,
PUZZLE_LINE_LONG }, {
X, X }, {
X, X }, {
X, X }
96 { 150,
PUZZLE_LINE_SHORT }, { 30,
PUZZLE_LINE_SHORT }, { -150,
PUZZLE_LINE_SHORT }, { -30,
PUZZLE_LINE_SHORT }, { 180,
PUZZLE_LINE_LONG }, { 0,
PUZZLE_LINE_LONG }, { -130,
PUZZLE_LINE_LONG }, { -75,
PUZZLE_LINE_LONG }, { -90,
PUZZLE_LINE_VERY_SHORT }
99 { 150,
PUZZLE_LINE_SHORT }, { 30,
PUZZLE_LINE_SHORT }, { -150,
PUZZLE_LINE_SHORT }, { -90,
PUZZLE_LINE_SHORT }, { 180,
PUZZLE_LINE_LONG }, { -130,
PUZZLE_LINE_LONG }, {
X, X }, {
X, X }, {
X, X }
102 { 150,
PUZZLE_LINE_SHORT }, { 30,
PUZZLE_LINE_SHORT }, { -120,
PUZZLE_LINE_SHORT }, { -90,
PUZZLE_LINE_SHORT }, { 90,
PUZZLE_LINE_SHORT }, { 0,
PUZZLE_LINE_LONG }, { -210,
PUZZLE_LINE_LONG }, { -90,
PUZZLE_LINE_LONG }, { -30,
PUZZLE_LINE_VERY_SHORT }
105 { 150,
PUZZLE_LINE_SHORT }, { 30,
PUZZLE_LINE_SHORT }, { -120,
PUZZLE_LINE_SHORT }, { -60,
PUZZLE_LINE_SHORT }, { 108,
PUZZLE_LINE_SHORT }, { 180,
PUZZLE_LINE_LONG }, { -30,
PUZZLE_LINE_LONG }, { -174,
PUZZLE_LINE_LONG }, { -234,
PUZZLE_LINE_VERY_SHORT }
108 { 105,
PUZZLE_LINE_NORMAL }, { 108,
PUZZLE_LINE_SHORT }, { -30,
PUZZLE_LINE_SHORT }, {
X, X }, { 30,
PUZZLE_LINE_LONG }, {
X, X }, {
X, X }, {
X, X }, {
X, X }
111 { 75,
PUZZLE_LINE_NORMAL }, { 120,
PUZZLE_LINE_SHORT }, { -150,
PUZZLE_LINE_SHORT }, {
X, X }, { 234,
PUZZLE_LINE_LONG }, {
X, X }, {
X, X }, {
X, X }, {
X, X }
114 { 108,
PUZZLE_LINE_SHORT }, { 150,
PUZZLE_LINE_SHORT }, { 0,
PUZZLE_LINE_SHORT }, {
X, X }, { 130,
PUZZLE_LINE_LONG }, {
X, X }, {
X, X }, {
X, X }, {
X, X }
117 { 120,
PUZZLE_LINE_SHORT }, { 180,
PUZZLE_LINE_SHORT }, { 0,
PUZZLE_LINE_SHORT }, {
X, X }, {
X, X }, { 75,
PUZZLE_LINE_LONG }, { 108,
PUZZLE_LINE_LONG }, { 100,
PUZZLE_LINE_SHORT }, {
X, X }
120 { 108,
PUZZLE_LINE_SHORT }, { 180,
PUZZLE_LINE_SHORT }, { 0,
PUZZLE_LINE_SHORT }, {
X, X }, {
X, X }, { 130,
PUZZLE_LINE_LONG }, { 160,
PUZZLE_LINE_NORMAL }, { 120,
PUZZLE_LINE_VERY_SHORT }, {
X, X }
123 { 120,
PUZZLE_LINE_SHORT }, { 30,
PUZZLE_LINE_SHORT }, { 180,
PUZZLE_LINE_SHORT }, {
X, X }, { 210,
PUZZLE_LINE_LONG }, {
X, X }, {
X, X }, {
X, X }, {
X, X }
127 void runPuzzleField ( int8_t, int8_t, int8_t ) ;
128 void runPuzzleFieldVectorChange ( int8_t, int8_t, int8_t, int32_t ) ;
129 void avoidBlock ( int8_t, int8_t, int8_t ) ;
#define PUZZLE_LINE_VERY_SHORT
#define PUZZLE_POLAR_COODINATE
#define PUZZLE_POSITION_CURRENT
#define PUZZLE_POSITION_NEXT
#define PUZZLE_POSITION_DESTINATE
#define PUZZLE_LINE_SHORT
#define PUZZLE_LINE_NORMAL