mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-30 21:42:59 +00:00 
			
		
		
		
	random pseudohept in Archimedean duals
This commit is contained in:
		| @@ -539,6 +539,7 @@ heptagon *build_child(heptspin p, pair<int, int> adj) { | |||||||
|     else |     else | ||||||
|       h->rval1 = 3 - p.at->move(0)->rval1 - p.at->rval1; |       h->rval1 = 3 - p.at->move(0)->rval1 - p.at->rval1; | ||||||
|     } |     } | ||||||
|  |   h->rval0 = hrand(256); | ||||||
|   heptspin hs(h, 0); |   heptspin hs(h, 0); | ||||||
|   return h; |   return h; | ||||||
|   } |   } | ||||||
| @@ -848,7 +849,10 @@ bool archimedean_tiling::support_chessboard() { | |||||||
|   return N % 2 == 0; |   return N % 2 == 0; | ||||||
|   } |   } | ||||||
|  |  | ||||||
| bool pseudohept(int id) { | bool pseudohept(cell *c) { | ||||||
|  |   if(DUAL) | ||||||
|  |     return !(c->master->rval0 & 3); | ||||||
|  |   int id = id_of(c->master); | ||||||
|   if(PURE)  |   if(PURE)  | ||||||
|     return current.flags[id] & arcm::sfPH; |     return current.flags[id] & arcm::sfPH; | ||||||
|   if(BITRUNCATED) |   if(BITRUNCATED) | ||||||
| @@ -866,12 +870,13 @@ bool linespattern(cell *c) { | |||||||
|   return current.flags[id_of(c->master)] & arcm::sfLINE; |   return current.flags[id_of(c->master)] & arcm::sfLINE; | ||||||
|   } |   } | ||||||
|  |  | ||||||
| int threecolor(int id) { | int threecolor(cell *c) { | ||||||
|   if(current.have_ph) |   if(current.have_ph) | ||||||
|     return !pseudohept(id); |     return !arcm::pseudohept(c); | ||||||
|   else if(PURE) |   else if(PURE) | ||||||
|     return current.tilegroup[id]; |     return current.tilegroup[id_of(c->master)]; | ||||||
|   else { |   else { | ||||||
|  |     int id = id_of(c->master); | ||||||
|     if(current.support_threecolor() == 2) return id < current.N * 2 ? (id&1) : 2; |     if(current.support_threecolor() == 2) return id < current.N * 2 ? (id&1) : 2; | ||||||
|     return current.tilegroup[id]; |     return current.tilegroup[id]; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -503,9 +503,9 @@ void generate_floorshapes() { | |||||||
|       if(DUAL) model.type /= 2, arcm::parent_index_of(&master) = !(i&1); |       if(DUAL) model.type /= 2, arcm::parent_index_of(&master) = !(i&1); | ||||||
|        |        | ||||||
|       if(BITRUNCATED) |       if(BITRUNCATED) | ||||||
|         generate_floorshapes_for(i, &model, !arcm::pseudohept(i), arcm::pseudohept(i) ? 0 : 1^(i&1)); |         generate_floorshapes_for(i, &model, !arcm::pseudohept(&model), arcm::pseudohept(&model) ? 0 : 1^(i&1)); | ||||||
|       else if(geosupport_football() == 2) |       else if(geosupport_football() == 2) | ||||||
|         generate_floorshapes_for(i, &model, !arcm::pseudohept(i), i >= 4 ? 1 : 0); |         generate_floorshapes_for(i, &model, !arcm::pseudohept(&model), i >= 4 ? 1 : 0); | ||||||
|       else |       else | ||||||
|         generate_floorshapes_for(i, &model, 0, 0); |         generate_floorshapes_for(i, &model, 0, 0); | ||||||
|       } |       } | ||||||
|   | |||||||
| @@ -1112,7 +1112,7 @@ int geosupport_football() { | |||||||
| int pattern_threecolor(cell *c) { | int pattern_threecolor(cell *c) { | ||||||
|   if(archimedean) { |   if(archimedean) { | ||||||
|     if(PURE) |     if(PURE) | ||||||
|       return arcm::threecolor(arcm::id_of(c->master)); |       return arcm::threecolor(c); | ||||||
|     else /* if(BITRUNCATED) */ |     else /* if(BITRUNCATED) */ | ||||||
|       return c->master->rval1; |       return c->master->rval1; | ||||||
|     } |     } | ||||||
| @@ -1217,7 +1217,7 @@ int pattern_threecolor(cell *c) { | |||||||
| bool pseudohept(cell *c) { | bool pseudohept(cell *c) { | ||||||
|   if(IRREGULAR) return irr::pseudohept(c); |   if(IRREGULAR) return irr::pseudohept(c); | ||||||
|   if(binarytiling) return c->type & c->master->distance & 1; |   if(binarytiling) return c->type & c->master->distance & 1; | ||||||
|   if(archimedean) return arcm::pseudohept(arcm::id_of(c->master)); |   if(archimedean) return arcm::pseudohept(c); | ||||||
|   if(GOLDBERG && gp_threecolor() == 2) |   if(GOLDBERG && gp_threecolor() == 2) | ||||||
|     return gp::pseudohept_val(c) == 0; |     return gp::pseudohept_val(c) == 0; | ||||||
|   if(GOLDBERG && gp_threecolor() == 1 && (S7&1) && (S3 == 3)) |   if(GOLDBERG && gp_threecolor() == 1 && (S7&1) && (S3 == 3)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue