diff --git a/devmods/rulegen-tests.cpp b/devmods/rulegen-tests.cpp index 932bb960..eb74eef0 100644 --- a/devmods/rulegen-tests.cpp +++ b/devmods/rulegen-tests.cpp @@ -520,6 +520,7 @@ string rule_name(int r) { else if(r == DIR_LEFT) return "L"; else if(r == DIR_RIGHT) return "R"; else if(r == DIR_PARENT) return "P"; + else if(r < -100) return "S"+its(r); else return its(r); } @@ -866,7 +867,7 @@ void test_current(string tesname) { treestates.clear(); /* we do not want to include the conversion time */ - if(!arb::in()) try { + if(!arb::in() && WDIM != 3) try { arb::convert::convert(); arb::convert::activate(); } @@ -1567,6 +1568,65 @@ void animate_to(int i) { println(hlog, "steps = ", steps); } +void genhoneycomb(string fname) { + if(WDIM != 3) throw hr_exception("genhoneycomb not in honeycomb"); + + int qc = isize(t_origin); + + vector data; + string side_data; + + map> rev_roadsign_id; + for(auto& rs: roadsign_id) rev_roadsign_id[rs.second] = rs.first; + + for(int i=0; i= 0) { + data.push_back(r); + } + else { + data.push_back(-1); + auto& str = rev_roadsign_id[r]; + bool next = true; + for(auto ch: str) { + if(next) side_data += ('a' + ch); + next = !next; + } + side_data += ","; + } + } + } + + shstream ss; + + auto& fp = currfp; + hwrite_fpattern(ss, fp); + + vector root(qc, 0); + for(int i=0; i