1
Fork 0
This repository has been archived on 2025-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
puzzle-wuzzle-generator/main.cpp

33 lines
590 B
C++

#include "dynamic_grid.hpp"
#include "clusters.hpp"
#include "solver.hpp"
#include "generator.hpp"
#include <iostream>
#include <random>
#include <chrono>
#include <thread>
int main(){
using namespace std;
std::random_device rd;
std::mt19937 gen(rd());
int c = 0;
while(true){
std::cout << "puzzle " << ++c << std::endl;
auto field = random_dynamic_grid(5, 2, 3, gen);
field.print(std::cout);
auto solution = solve(field);
for(auto&& t : solution.taps){
std::cout << "(" << t.first << ", " << t.second << ")\n";
}
if(!solution.taps.empty()){
break;
}
}
}