aboutsummaryrefslogtreecommitdiff
path: root/src/cube.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-10-22 14:48:42 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-10-22 14:48:42 +0200
commit0c49ed5afc2ae9e4bc4aa1af9c655bbe1f3d14b8 (patch)
tree4e69457ed87cb06decc12889a1ded18c17610dad /src/cube.c
parent259c7326f78d5495f5dc51c619932599a5279f68 (diff)
downloadnissy-core-0c49ed5afc2ae9e4bc4aa1af9c655bbe1f3d14b8.tar.gz
nissy-core-0c49ed5afc2ae9e4bc4aa1af9c655bbe1f3d14b8.zip
Small change of plans, moved stuff around
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/*
2In this implementation of the cube.h interface, the cube is represented
3by two arrays of 8-bit unsigned integers, one for centers and one for
4corners. The 4 leas-significant digits of each bit determine the piece,
5the other 4 are used for orientation or kept to 0.
6
7Edges:
8 xxxopppp (x = unused, o = orientation, p = piece)
9
10Corners:
11 xooxpppp (x = unused, o = orientation, p = piece)
12
13The two bits for CO are shifted to make it possible to perform mod 3
14operations (sum, inverse) using only addition and bitwise operators.
15See below for details.
16
17The 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

Generated with cgit - Back to sebastiano.tronto.net