1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

nilrider:: nlrOrder flag to order the triangles correctly

This commit is contained in:
Zeno Rogue 2022-05-03 22:06:21 +02:00
parent 0e3e3b9042
commit b3e29d9e03
3 changed files with 14 additions and 2 deletions

View File

@ -247,6 +247,13 @@ void level::init() {
// println(hlog, shFloor[i].s, " to ", shFloor[i].e);
}
if(flags & nrlOrder) {
sort(triangles.begin(), triangles.end(), [this] (triangledata a, triangledata b) {
return atan2(spin(120*degree)*(a.where - start.where)) < atan2(spin(120*degree)*(b.where - start.where));
});
for(auto t: triangles) println(hlog, t.where);
}
cgi.extra_vertices();
init_plan();
}

View File

@ -370,11 +370,15 @@ level heisenberg0(
"!!!!!!!!!!!!!!!!"
},
8, 8,
f_heisenberg0
f_heisenberg0,
{
// the solver[0.25] result is 49:15
goal{0x40FFd0, "Collect all triangles in below 0:55", basic_check(55, 999)}
}
);
level rotwell(
"Deep Well", 'd', 0,
"Deep Well", 'd', nrlOrder,
"Can you escape this well?",
-7.5*dft_block, 7.5*dft_block, 8.5*dft_block, -8.5*dft_block,
{

View File

@ -36,6 +36,7 @@ struct planpoint {
using plan_t = vector<planpoint>;
constexpr flagtype nrlPolar = Flag(1);
constexpr flagtype nrlOrder = Flag(2);
struct statue {
transmatrix T;