mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	Merge pull request #218 from jruderman/tbd_indexing
Fix array indexing in totalbulldistance
This commit is contained in:
		| @@ -567,7 +567,7 @@ EX int totalbulldistance(cell *c, int k) { | |||||||
|   shpos.resize(SHSIZE); |   shpos.resize(SHSIZE); | ||||||
|   int tbd = 0; |   int tbd = 0; | ||||||
|   for(int p: player_indices()) { |   for(int p: player_indices()) { | ||||||
|     cell *c2  = shpos[p][(cshpos+SHSIZE-k-1)%SHSIZE]; |     cell *c2  = shpos[(cshpos+SHSIZE-k-1)%SHSIZE][p]; | ||||||
|     if(c2) tbd += bulldistance(c, c2); |     if(c2) tbd += bulldistance(c, c2); | ||||||
|     } |     } | ||||||
|   return tbd; |   return tbd; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue