mirror of https://github.com/dnomd343/klotski.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
431 B
19 lines
431 B
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
#define UP (-12) // -4 * 3-bits
|
|
#define LEFT (-3) // +1 * 3-bits
|
|
#define DOWN (+12) // +4 * 3-bits
|
|
//#define DOWN_2 (+24) // +8 * 3-bits
|
|
#define RIGHT (+3) // +1 * 3-bits
|
|
//#define RIGHT_2 (+6) // +2 * 3-bits
|
|
|
|
struct cache_t {
|
|
uint64_t code; // raw code
|
|
uint64_t mask; // only 000 or 111
|
|
int filter;
|
|
int addr;
|
|
};
|
|
|
|
void next_step(uint64_t raw_code, uint64_t mask);
|
|
|