mirror of https://github.com/dnomd343/klotski.git
Dnomd343
2 years ago
9 changed files with 3268 additions and 3201 deletions
@ -1,3 +1,3 @@ |
|||||
cmake_minimum_required(VERSION 3.0) |
cmake_minimum_required(VERSION 3.0) |
||||
|
|
||||
add_library(group OBJECT group.cc block_num.cc build_cases.cc group_info.cc) |
add_library(group OBJECT seeds.cc group.cc block_num.cc build_cases.cc group_info.cc) |
||||
|
File diff suppressed because it is too large
@ -0,0 +1,34 @@ |
|||||
|
#include "group.h" |
||||
|
#include "type_id.h" |
||||
|
#include "group_seeds.h" |
||||
|
|
||||
|
#include <iostream> |
||||
|
|
||||
|
namespace klotski { |
||||
|
|
||||
|
CommonCode Group::group_seed(uint32_t type_id, uint32_t group_id) { |
||||
|
|
||||
|
// TODO: check value
|
||||
|
|
||||
|
auto offset = TYPE_ID_OFFSET[type_id]; |
||||
|
|
||||
|
std::cout << "size: " << TYPE_ID_GROUP_NUM[type_id] << std::endl; |
||||
|
|
||||
|
auto k = GROUP_SEEDS_INDEX[offset + group_id]; |
||||
|
|
||||
|
std::cout << "tmp index: " << k << std::endl; |
||||
|
|
||||
|
auto r = k + offset; |
||||
|
|
||||
|
std::cout << "real index: " << r << std::endl; |
||||
|
|
||||
|
auto seed = CommonCode(GROUP_SEEDS[r]); |
||||
|
|
||||
|
std::cout << "seed: " << seed << std::endl; |
||||
|
|
||||
|
std::cout << RawCode(seed) << std::endl; |
||||
|
|
||||
|
return seed; |
||||
|
} |
||||
|
|
||||
|
} // namespace klotski
|
File diff suppressed because it is too large
File diff suppressed because it is too large
Loading…
Reference in new issue