mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 14:02:59 +00:00 
			
		
		
		
	rulegen3:: honeycomb_value
This commit is contained in:
		| @@ -86,11 +86,10 @@ static const flagtype w_less_smart_retrace = Flag(22); /*< stop early when exami | ||||
| static const flagtype w_less_smart_advance = Flag(23); /*< stop early when examining smart shortcut advancement */ | ||||
| static const flagtype w_no_queued_extensions = Flag(24); /*< consider extensions one by one */ | ||||
| static const flagtype w_no_branch_skipping = Flag(24); /*< do not skip branches */ | ||||
| static const flagtype w_vertex_edges = Flag(25); /*< in reg3 all_edges, consider vertex adjacency */ | ||||
| static const flagtype w_ae_extra_step = Flag(26); /*< in reg3 all_edges, make one extra step */ | ||||
| static const flagtype w_adj_only = Flag(27); /*< in reg3 adjacent only */ | ||||
| #endif | ||||
|  | ||||
| EX int honeycomb_value = 1; /* how far to build local for honeycombs */ | ||||
|  | ||||
| EX flagtype flags = 0; | ||||
|  | ||||
| EX int64_t movecount; | ||||
| @@ -1338,7 +1337,7 @@ EX void id_at_spin(twalker cw, vector<twalker>& sprawl, vector<analyzer_state*>& | ||||
|       a = alloc_analyzer(); | ||||
|       } | ||||
|     states.push_back(a); | ||||
|     if(WDIM == 3 && !(flags & w_adj_only)) { | ||||
|     if(WDIM == 3 && honeycomb_value) { | ||||
|       auto& ae = check_all_edges(cw, a, isize(sprawl)); | ||||
|       int id = isize(sprawl); | ||||
|       if(id < isize(ae)) { | ||||
|   | ||||
| @@ -163,7 +163,7 @@ EX vector<pair<int, int>>& check_all_edges(twalker cw, analyzer_state* a, int id | ||||
|       for(auto w: rotated) | ||||
|         if(sqhypot_d(MDIM, v-w) < 1e-6) | ||||
|           common++; | ||||
|       if(flags & w_vertex_edges) { | ||||
|       if(honeycomb_value >= 2) { | ||||
|         if(common < 1) { ae1.emplace_back(id, dir); return; } | ||||
|         } | ||||
|       else { | ||||
| @@ -179,7 +179,7 @@ EX vector<pair<int, int>>& check_all_edges(twalker cw, analyzer_state* a, int id | ||||
|         visit(tw + j + wstep, visited[i].second * currentmap->adj(tcell_to_cell[tw.at], (tw+j).spin), i, j); | ||||
|         } | ||||
|       } | ||||
|     if(flags & w_ae_extra_step) for(auto p: ae1) ae.push_back(p); | ||||
|     if(honeycomb_value >= 3) for(auto p: ae1) ae.push_back(p); | ||||
|     println(hlog, "for ", tie(cw.at->id, cw.spin), " generated all_edges structure: ", ae, " of size ", isize(ae)); | ||||
|     } | ||||
|   return ae; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue