-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalisson.cpp
44 lines (39 loc) · 1.09 KB
/
calisson.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <cstdlib>
#include <ctime>
#include <iostream>
// #include "grid.hpp"
#include "calisson_grid.hpp"
#include "weighted_grid.hpp"
int main(int argc, char *argv[]) {
// std::cout << "Taille grille" << std ::endl;
int taille;
std::cin >> taille;
srand(clock());
// Grid g(1);
// if (rand() % 2 == 0)
// g.set_square_horizontal(0, 0);
// else
// g.set_square_vertical(0, 0);
// g = Grid(4, g);
// g = Grid(g);
// g = Grid(g);
// std::cout << g;
// Grid g = get_random_grid(taille);
// std::cout << g;
// g.to_svg(std::cout);
// WeightedGrid wg = weighted_grid_square(taille);
// // std::cout << wg << "\n";
// std::cout << wg.get_random_weighted_grid();
// Calissons::Grid c(std::cin);
// c.solve();
Dominos::WeightedGrid wg(Dominos::wg_size_from_hex_size(taille));
// // std::cout << wg.size() << "\n";
wg.set_constant(1);
wg.remove_hex();
Dominos::Grid g = wg.get_random_weighted_grid();
Calissons::Grid c(g);
c.segmentify();
// std::cout << taille << "\n";
c.to_image_blueprint(std::cout);
// std::cout << c;
}