mirror of https://github.com/dnomd343/klotski.git
Dnomd343
2 years ago
3 changed files with 36 additions and 8 deletions
@ -1,8 +1,11 @@ |
|||
#pragma once |
|||
|
|||
#include <string> |
|||
#include <cstdint> |
|||
|
|||
class CommonCode { |
|||
public: |
|||
static bool check(uint64_t common_code); |
|||
// static uint64_t code_from_string(const std::string &common_code);
|
|||
static std::string code_to_string(uint64_t common_code, bool shorten = false); |
|||
}; |
|||
|
@ -1,35 +1,39 @@ |
|||
#include <iostream> |
|||
#include "all_cases.h" |
|||
#include "short_code.h" |
|||
//#include "common_code.h"
|
|||
#include "common_code.h" |
|||
|
|||
int main() { |
|||
|
|||
// auto a = AllCases();
|
|||
// auto a = AllCases(AllCases::Build::BASIC_RANGES);
|
|||
// auto a = AllCases(AllCases::Build::ALL_CASES);
|
|||
//
|
|||
|
|||
// std::cout << "start getting basic ranges" << std::endl;
|
|||
// std::cout << "basic range: " << a.get_basic_ranges()->size() << std::endl;
|
|||
//
|
|||
|
|||
// std::cout << "start getting all cases" << std::endl;
|
|||
// for (const auto &temp : *a.get_all_cases()) {
|
|||
// std::cout << " " << temp.size() << std::endl;
|
|||
// }
|
|||
|
|||
|
|||
auto s = ShortCode(); |
|||
// auto s = ShortCode();
|
|||
// auto s = ShortCode(ShortCode::Mode::NORMAL);
|
|||
// auto s = ShortCode(ShortCode::Mode::FAST);
|
|||
|
|||
// s.speed_up(ShortCode::Mode::NORMAL);
|
|||
// s.speed_up(ShortCode::Mode::FAST);
|
|||
|
|||
printf("%d\n", s.zip_short_code(0x6EC0F8800)); |
|||
printf("%09lX\n", s.unzip_short_code(14323231)); |
|||
// printf("%d\n", s.zip_short_code(0x6EC0F8800));
|
|||
// printf("%09lX\n", s.unzip_short_code(14323231));
|
|||
|
|||
// std::cout << ShortCode::code_to_string(14323231) << std::endl;
|
|||
// std::cout << ShortCode::code_from_string("EP4HZ") << std::endl;
|
|||
|
|||
|
|||
std::cout << ShortCode::code_to_string(14323231) << std::endl; |
|||
std::cout << ShortCode::code_from_string("EP4HZ") << std::endl; |
|||
std::cout << CommonCode::code_to_string(0x4FEA13400, true) << std::endl; |
|||
std::cout << CommonCode::code_to_string(0x4FEA13400) << std::endl; |
|||
|
|||
return 0; |
|||
} |
|||
|
Loading…
Reference in new issue