Fix array indexing in totalbulldistance

This commit is contained in:
Jesse Ruderman 2021-07-11 04:07:32 -07:00
parent cac0b57d7c
commit a138fa0952
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;