华容道高性能计算引擎
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.
 
 
 
 
 

31 lines
673 B

#pragma once
#include <cstdint>
#include "common_code.h"
#define B_space 0b000
#define B_fill 0b111
#define B_1x2 0b001
#define B_2x1 0b010
#define B_1x1 0b011
#define B_2x2 0b100
#define C_1x1 (uint64_t)0x3 // 011
#define C_1x2 (uint64_t)0x39 // 111 001
#define C_2x1 (uint64_t)0x7002 // 111 000 000 000 010
#define C_2x2 (uint64_t)0x3F03C // 111 111 000 000 111 100
class CommonCode;
class RawCode {
public:
uint64_t unwrap() const;
std::string dump_case() const;
CommonCode to_common_code() const;
explicit RawCode(const CommonCode &common_code);
explicit RawCode(uint64_t raw_code) : code(raw_code) {}
private:
uint64_t code;
};