From 80b065f757240af7920862b3e09f32a6dc06d392 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 4 Oct 2024 12:01:41 +0200 Subject: Table-based transformations (will revert immediately) This commit changes transformations to being based on a lookup table intead of a big switch. This is something I had planned for a long time and the code is nicer with this change. But unfortunately the performance is noticeably worse, so I'll revert all these changes in the next commit. I wanted to push this anyway so we can keep track of this. --- src/core/moves.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/moves.h') diff --git a/src/core/moves.h b/src/core/moves.h index f0d7646..4847f03 100644 --- a/src/core/moves.h +++ b/src/core/moves.h @@ -1,5 +1,5 @@ -#define MOVE(M, c) compose(c, MOVE_CUBE_ ## M) -#define PREMOVE(M, c) compose(MOVE_CUBE_ ## M, c) +#define MOVE(M, c) compose(c, cubefrompieces(MOVE_CUBE_ ## M)) +#define PREMOVE(M, c) compose(cubefrompieces(MOVE_CUBE_ ## M), c) STATIC_INLINE bool allowednextmove(uint8_t *, uint8_t); -- cgit v1.3