|
|
@ -2,7 +2,8 @@ |
|
|
|
|
|
|
|
using klotski::RawCode; |
|
|
|
|
|
|
|
/// Mirror convert functions
|
|
|
|
/// ----------------------------- Mirror Convert ------------------------------
|
|
|
|
|
|
|
|
RawCode RawCode::to_vertical_mirror() const { |
|
|
|
return RawCode::unsafe_create(vertical_mirror(code)); |
|
|
|
} |
|
|
@ -11,50 +12,34 @@ RawCode RawCode::to_horizontal_mirror() const { |
|
|
|
return RawCode::unsafe_create(horizontal_mirror(code)); |
|
|
|
} |
|
|
|
|
|
|
|
/// Mirror check functions
|
|
|
|
bool RawCode::is_vertical_mirror() const { |
|
|
|
|
|
|
|
// TODO: vertical mirror check
|
|
|
|
/// ------------------------------ Mirror Check -------------------------------
|
|
|
|
|
|
|
|
return false; |
|
|
|
bool RawCode::is_vertical_mirror() const { |
|
|
|
return vertical_mirror_check(code); |
|
|
|
} |
|
|
|
|
|
|
|
bool RawCode::is_horizontal_mirror() const { |
|
|
|
|
|
|
|
// TODO: horizontal mirror check
|
|
|
|
|
|
|
|
return false; |
|
|
|
return horizontal_mirror_check(code); |
|
|
|
} |
|
|
|
|
|
|
|
bool RawCode::is_vertical_mirror(RawCode &&raw_code) const { |
|
|
|
|
|
|
|
// TODO: vertical mirror check
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
bool RawCode::is_vertical_mirror(const RawCode &raw_code) const { |
|
|
|
|
|
|
|
// TODO: vertical mirror check
|
|
|
|
|
|
|
|
return false; |
|
|
|
return raw_code.unwrap() == vertical_mirror(code); |
|
|
|
} |
|
|
|
|
|
|
|
bool RawCode::is_horizontal_mirror(RawCode &&raw_code) const { |
|
|
|
return raw_code.unwrap() == horizontal_mirror(code); |
|
|
|
} |
|
|
|
|
|
|
|
// TODO: horizontal mirror check
|
|
|
|
|
|
|
|
return false; |
|
|
|
bool RawCode::is_vertical_mirror(const RawCode &raw_code) const { |
|
|
|
return raw_code.unwrap() == vertical_mirror(code); |
|
|
|
} |
|
|
|
|
|
|
|
bool RawCode::is_horizontal_mirror(const RawCode &raw_code) const { |
|
|
|
|
|
|
|
// TODO: horizontal mirror check
|
|
|
|
|
|
|
|
return false; |
|
|
|
return raw_code.unwrap() == horizontal_mirror(code); |
|
|
|
} |
|
|
|
|
|
|
|
/// Basic mirror convert
|
|
|
|
/// ----------------------------- Basic Functions -----------------------------
|
|
|
|
|
|
|
|
uint64_t RawCode::vertical_mirror(uint64_t raw_code) { |
|
|
|
|
|
|
|
// TODO: vertical mirror convert
|
|
|
@ -68,3 +53,17 @@ uint64_t RawCode::horizontal_mirror(uint64_t raw_code) { |
|
|
|
|
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
bool RawCode::vertical_mirror_check(uint64_t raw_code) { |
|
|
|
|
|
|
|
// TODO: whether self vertical mirror
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
bool RawCode::horizontal_mirror_check(uint64_t raw_code) { |
|
|
|
|
|
|
|
// TODO: whether self horizontal mirror
|
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|