mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
patterns W and X
This commit is contained in:
parent
9e2a9604bd
commit
76a0ea8795
12
pattern2.cpp
12
pattern2.cpp
@ -1562,7 +1562,7 @@ EX namespace patterns {
|
|||||||
|
|
||||||
map<cell*, color_t> computed_furthest_map;
|
map<cell*, color_t> computed_furthest_map;
|
||||||
|
|
||||||
color_t furthest_map(cell *c) {
|
color_t furthest_map(cell *c, int reduce) {
|
||||||
auto& cfm = computed_furthest_map;
|
auto& cfm = computed_furthest_map;
|
||||||
if(cfm.count(c)) return cfm[c];
|
if(cfm.count(c)) return cfm[c];
|
||||||
if(!bounded) return 0;
|
if(!bounded) return 0;
|
||||||
@ -1580,7 +1580,7 @@ EX namespace patterns {
|
|||||||
|
|
||||||
for(cell *d: ac) cfm[d] = 0x101010;
|
for(cell *d: ac) cfm[d] = 0x101010;
|
||||||
|
|
||||||
for(cell *d: ac) if(celldistance(sc, d) == maxd)
|
for(cell *d: ac) if(celldistance(sc, d) == maxd - reduce)
|
||||||
cfm[d] = 0x1FFFF80;
|
cfm[d] = 0x1FFFF80;
|
||||||
|
|
||||||
println(hlog, "bydist = ", bydist);
|
println(hlog, "bydist = ", bydist);
|
||||||
@ -1823,7 +1823,13 @@ EX namespace patterns {
|
|||||||
return nearer_map(c);
|
return nearer_map(c);
|
||||||
}
|
}
|
||||||
case 'Y': {
|
case 'Y': {
|
||||||
return furthest_map(c);
|
return furthest_map(c, 0);
|
||||||
|
}
|
||||||
|
case 'X': {
|
||||||
|
return furthest_map(c, 1);
|
||||||
|
}
|
||||||
|
case 'W': {
|
||||||
|
return furthest_map(c, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return canvasback;
|
return canvasback;
|
||||||
|
Loading…
Reference in New Issue
Block a user