diff options
Diffstat (limited to '')
| -rw-r--r-- | src/cube.c (renamed from src/cube_array.c) | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/cube_array.c b/src/cube.c index cbf59e4..f6e6a8f 100644 --- a/src/cube_array.c +++ b/src/cube.c | |||
| @@ -1,22 +1,3 @@ | |||
| 1 | /* | ||
| 2 | In this implementation of the cube.h interface, the cube is represented | ||
| 3 | by two arrays of 8-bit unsigned integers, one for centers and one for | ||
| 4 | corners. The 4 leas-significant digits of each bit determine the piece, | ||
| 5 | the other 4 are used for orientation or kept to 0. | ||
| 6 | |||
| 7 | Edges: | ||
| 8 | xxxopppp (x = unused, o = orientation, p = piece) | ||
| 9 | |||
| 10 | Corners: | ||
| 11 | xooxpppp (x = unused, o = orientation, p = piece) | ||
| 12 | |||
| 13 | The two bits for CO are shifted to make it possible to perform mod 3 | ||
| 14 | operations (sum, inverse) using only addition and bitwise operators. | ||
| 15 | See below for details. | ||
| 16 | |||
| 17 | The third bit is needed because x+y+1 can exceed 4. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include <inttypes.h> | 1 | #include <inttypes.h> |
| 21 | #include <stdbool.h> | 2 | #include <stdbool.h> |
| 22 | #include <string.h> | 3 | #include <string.h> |
| @@ -25,7 +6,6 @@ The third bit is needed because x+y+1 can exceed 4. | |||
| 25 | #include <stdio.h> | 6 | #include <stdio.h> |
| 26 | #endif | 7 | #endif |
| 27 | 8 | ||
| 28 | #include "constants.h" | ||
| 29 | #include "cube.h" | 9 | #include "cube.h" |
| 30 | 10 | ||
| 31 | #define _c_ufr 0U | 11 | #define _c_ufr 0U |
