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.
27 lines
687 B
27 lines
687 B
#pragma once
|
|
|
|
#include <vector>
|
|
#include <cstdint>
|
|
|
|
#include "utils/utility.h"
|
|
|
|
namespace klotski::cases {
|
|
|
|
class Ranges : public std::vector<uint32_t> {
|
|
public:
|
|
/// Spawn klotski-ranges that match the specified block numbers.
|
|
void spawn(int n, int n_2x1, int n_1x1);
|
|
|
|
/// Derive the legal klotski-ranges with specified head.
|
|
void derive(int head, Ranges &output) const;
|
|
|
|
/// Check whether the combination of head and range is valid.
|
|
static KLSK_INLINE int check(int head, uint32_t range);
|
|
};
|
|
|
|
typedef std::array<Ranges, 16> RangesUnion;
|
|
|
|
// TODO: add RangesUnion here
|
|
// TODO: -> spawn from Ranges / export std::vector<CommonCode>
|
|
|
|
} // namespace klotski::cases
|
|
|