diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-31 19:17:42 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-10-31 19:17:42 +0100 |
| commit | d65ce8e86b517ef3f7d48cf5ded1101444e05b2b (patch) | |
| tree | 6ac473a067fa06dbd64691adf2ddaafd8adc6e06 /doc/CUBE_INTERNAL.md | |
| parent | bc2e6b8a8d5a6eccd2c2ac433e8a307ee356f14e (diff) | |
| download | nissy-core-d65ce8e86b517ef3f7d48cf5ded1101444e05b2b.tar.gz nissy-core-d65ce8e86b517ef3f7d48cf5ded1101444e05b2b.zip | |
Reorganized documentation
Diffstat (limited to 'doc/CUBE_INTERNAL.md')
| -rw-r--r-- | doc/CUBE_INTERNAL.md | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/doc/CUBE_INTERNAL.md b/doc/CUBE_INTERNAL.md deleted file mode 100644 index fd3148a..0000000 --- a/doc/CUBE_INTERNAL.md +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | # Internal representation of the cube | ||
| 2 | |||
| 3 | The plan (TODO) is to have multiple implementations: some that | ||
| 4 | take advantage of advanced CPU instructions (SIMD) and a fallback | ||
| 5 | "array" representation that works on any architecture. | ||
| 6 | |||
| 7 | # Array representation (fallback) | ||
| 8 | |||
| 9 | In this implementation of the cube.h interface, the cube is represented | ||
| 10 | by two arrays of 8-bit unsigned integers, one for centers and one for | ||
| 11 | corners. The 4 leas-significant digits of each bit determine the piece, | ||
| 12 | the other 4 are used for orientation or kept to 0. | ||
| 13 | |||
| 14 | Edges: | ||
| 15 | xxxopppp (x = unused, o = orientation, p = piece) | ||
| 16 | |||
| 17 | Corners: | ||
| 18 | xooxpppp (x = unused, o = orientation, p = piece) | ||
| 19 | |||
| 20 | The two bits for CO are shifted to make it possible to perform mod 3 | ||
| 21 | operations (sum, inverse) using only addition and bitwise operators. | ||
| 22 | See below for details. | ||
| 23 | |||
| 24 | The third bit is needed because x+y+1 can exceed 4. | ||
