mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-20 03:54:47 +00:00
rulegen3:: w_r3_no_road_shortcuts
This commit is contained in:
parent
47d2b5b27b
commit
75c9258537
@ -92,6 +92,7 @@ static const flagtype w_skip_transducers = Flag(32); /*< skip the transducer tes
|
||||
static const flagtype w_skip_transducer_loops = Flag(33); /*< skip loops during the transducer test */
|
||||
static const flagtype w_skip_transducer_terminate = Flag(34); /*< skip termination during the transducer test */
|
||||
static const flagtype w_r3_all_errors = Flag(35); /*< consider all errors for R3 */
|
||||
static const flagtype w_r3_no_road_shortcuts = Flag(36); /*< consider all errors for R3 */
|
||||
#endif
|
||||
|
||||
/** these control the output */
|
||||
|
@ -24,6 +24,7 @@ map<int, int> qroad_for;
|
||||
map<tcell*, int> qroad_memo;
|
||||
|
||||
EX void add_road_shortcut(tcell *s, tcell *t) {
|
||||
if(flags & w_r3_no_road_shortcuts) return;
|
||||
shared_ptr<road_shortcut_trie_vertex> u;
|
||||
vector<int> tpath;
|
||||
if(!road_shortcuts.count(s->id)) road_shortcuts[s->id] = make_shared<road_shortcut_trie_vertex>();
|
||||
@ -58,6 +59,7 @@ EX void add_road_shortcut(tcell *s, tcell *t) {
|
||||
EX int newcon;
|
||||
|
||||
EX void apply_road_shortcut(tcell *s) {
|
||||
if(flags & w_r3_no_road_shortcuts) return;
|
||||
auto& mem = qroad_memo[s];
|
||||
if(mem == qroad_for[s->id]) return;
|
||||
mem = qroad_for[s->id];
|
||||
|
Loading…
Reference in New Issue
Block a user