Commit cc50489a authored by Adam P. Goucher's avatar Adam P. Goucher
Browse files

Ability to reach behind obstacles

parent 145a5cd0
......@@ -361,9 +361,11 @@ namespace apg {
if (initbail >= 16) {
sword = diagonal;
if (initbail < 64) { sword = sword.convolve(smallblock); }
if (initbail < 128) { sword = sword.convolve(smallblock); }
if (initbail < 256) { sword = sword.convolve(smallblock); }
if (initbail < 64) {
sword = sword.convolve(smallblock);
} else {
sword = pattern(lab, "o!", rule);
}
}
std::vector<pattern> xdimers = dimerise(stell, cfier, sword);
......@@ -489,8 +491,9 @@ namespace apg {
env.getbbox(bbox);
pattern remainder = stell - dimer;
pattern dcs = dimer.convolve(sword);
if (!(dimer.convolve(sword) & remainder).empty()) { continue; }
if ((dcs & remainder).nonempty() && (dcs(12, 0) & remainder).nonempty() && (dcs(0, 12) & remainder).nonempty()) { continue; }
for (uint64_t j = 0; j < 4; j++) {
......@@ -601,7 +604,7 @@ namespace apg {
if (newpat != newpat2) {
std::cout << "\033[32;1mSimplification made by strategy 'deep'\033[0m" << std::endl;
return newpat2;
} else if (altstelllength <= stelllength - 25.0) {
} else if ((nbespoke == 0) && (altstelllength <= stelllength - 25.0)) {
std::cout << "\033[32;1mSimplification made by strategy 'tree'\033[0m: ";
std::cout << "length " << stelllength << " --> " << altstelllength << std::endl;
return newpat;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment