simplify puzzle data and auto run codegen

This commit is contained in:
Asuro
2025-03-14 01:33:38 +01:00
parent 97146664f2
commit de88190c47
9 changed files with 82 additions and 143 deletions

View File

@@ -31,17 +31,16 @@ namespace Generated
void LoadStaticPuzzleData();
void SaveStaticPuzzleData();
const StaticPuzzleCard& GetCard(const StaticPuzzleData& data, StaticPuzzleCardHandle H);
bool HasElement(const PuzzleNode& node, PuzzleElementType::Enum search);
bool IsEmpty(const PuzzleNode& node);
bool IsValid(StaticPuzzleCardHandle h);
uint8_t GetRemainingCount(const PuzzleCardStack& stack);
const PuzzleNode& GetNodeAt(const PuzzleData& puz, PuzPos pos);
PuzzleElementType::Enum GetElementAt(const PuzzleData& puz, ElemPos pos);
PuzzleElementType::Enum GetNodeAt(const PuzzleData& puz, PuzPos pos);
PuzzleElementType::Enum GetCardNodeAt(const StaticPuzzleCard& card, int8_t x, int8_t y);
PuzzleElementType::Enum& EditCardNodeAt(StaticPuzzleCard& card, int8_t x, int8_t y);
struct PuzzleSolver
{
bool IsPuzzleSolved(const Generated::PuzzleData& puzzle);
bool IsExitSatisfied(const Generated::PuzzleData& puzzle, ElemPos pos);
bool IsExitSatisfied(const Generated::PuzzleData& puzzle, PuzPos pos);
// This assumes flowFrom is already verified to be connected.
bool IsValidGoalConnection(const Generated::PuzzleData& puzzle,