mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-09 12:16:45 +00:00
yet more interesting Yendor path in binary tilings
This commit is contained in:
parent
7fadb7f98f
commit
6e2c869a60
10
yendor.cpp
10
yendor.cpp
@ -227,8 +227,14 @@ namespace yendor {
|
||||
// make it challenging
|
||||
vector<int> ds;
|
||||
for(int d=0; d<ycw.at->type; d++) {
|
||||
if(celldistAlt((ycw+d).cpeek()) < celldistAlt(ycw.at))
|
||||
ds.push_back(d);
|
||||
if(i < YDIST/2) {
|
||||
if(celldistAlt((ycw+d).cpeek()) < celldistAlt(ycw.at))
|
||||
ds.push_back(d);
|
||||
}
|
||||
else {
|
||||
if(celldistAlt((ycw+d).cpeek()) > celldistAlt(ycw.at) && (ycw+d).cpeek() != nyi.path[i-1])
|
||||
ds.push_back(d);
|
||||
}
|
||||
}
|
||||
if(isize(ds)) ycw += ds[hrand(isize(ds))];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user