Merge pull request #218 from jruderman/tbd_indexing

Fix array indexing in totalbulldistance
This commit is contained in:
Zeno Rogue 2021-07-11 15:26:46 +02:00 committed by GitHub
commit 3f2c8d7479
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -567,7 +567,7 @@ EX int totalbulldistance(cell *c, int k) {
shpos.resize(SHSIZE);
int tbd = 0;
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);
}
return tbd;