aboutsummaryrefslogtreecommitdiff
path: root/src/core/moves.h
diff options
context:
space:
mode:
authorenricotenuti <tenutz_27@outlook.it>2024-08-30 17:47:48 +0200
committerenricotenuti <tenutz_27@outlook.it>2024-08-30 17:47:48 +0200
commit4abb800c4b4f3a509c07821ade8d34e3699bdf10 (patch)
tree92656dec1fe1ae38365d93c5a910fd415f979e1e /src/core/moves.h
parent754e632241859b224497ee4e0239670d5d90759f (diff)
downloadnissy-core-4abb800c4b4f3a509c07821ade8d34e3699bdf10.tar.gz
nissy-core-4abb800c4b4f3a509c07821ade8d34e3699bdf10.zip
format fix
Diffstat (limited to 'src/core/moves.h')
-rw-r--r--src/core/moves.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/moves.h b/src/core/moves.h
index 9753993..8f9c8f5 100644
--- a/src/core/moves.h
+++ b/src/core/moves.h
@@ -12,6 +12,7 @@ _static uint32_t allowednextmoveH48(uint8_t *, uint8_t, uint32_t);
12_static_inline uint8_t inverse_trans(uint8_t); 12_static_inline uint8_t inverse_trans(uint8_t);
13_static_inline uint8_t movebase(uint8_t); 13_static_inline uint8_t movebase(uint8_t);
14_static_inline uint8_t moveaxis(uint8_t); 14_static_inline uint8_t moveaxis(uint8_t);
15_static_inline uint32_t disable_moves(uint32_t, uint8_t);
15 16
16_static cube_t move(cube_t, uint8_t); 17_static cube_t move(cube_t, uint8_t);
17_static cube_t premove(cube_t, uint8_t); 18_static cube_t premove(cube_t, uint8_t);
@@ -43,10 +44,10 @@ allowednextmove(uint8_t *moves, uint8_t n)
43 return axis[1] != axis[2] || base[0] != base[2]; 44 return axis[1] != axis[2] || base[0] != base[2];
44} 45}
45 46
46static uint32_t 47_static_inline uint32_t
47disable_moves(uint32_t current_result, uint8_t base_index) 48disable_moves(uint32_t current_result, uint8_t base_index)
48{ 49{
49 return current_result & ~((1 << base_index) | (1 << (base_index + 1)) | (1 << (base_index + 2))); 50 return current_result & ~(7 << base_index);
50} 51}
51 52
52_static uint32_t 53_static uint32_t
@@ -144,7 +145,7 @@ move(cube_t c, uint8_t m)
144_static cube_t 145_static cube_t
145premove(cube_t c, uint8_t m) 146premove(cube_t c, uint8_t m)
146{ 147{
147 switch (m) { 148 switch (m) {
148 case _move_U: 149 case _move_U:
149 return _premove(U3, c); 150 return _premove(U3, c);
150 case _move_U2: 151 case _move_U2:

Generated with cgit - Back to sebastiano.tronto.net