Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
fix auto-explore information leak when unknown temporal wall blocks t…
Browse files Browse the repository at this point in the history
…he way
  • Loading branch information
anaseto committed Sep 9, 2018
1 parent 32fe9b9 commit 94db7b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions path.go
Expand Up @@ -39,7 +39,7 @@ func (pp *playerPath) Neighbors(pos position) []position {
if cld, ok := pp.game.Clouds[npos]; ok && cld == CloudFire && !(pp.game.WrongDoor[npos] || pp.game.WrongFoliage[npos]) {
return false
}
return npos.valid() && ((d.Cell(npos).T == FreeCell && !pp.game.WrongWall[pos] || d.Cell(npos).T == WallCell && pp.game.WrongWall[pos]) || pp.game.Player.HasStatus(StatusDig)) &&
return npos.valid() && ((d.Cell(npos).T == FreeCell && !pp.game.WrongWall[npos] || d.Cell(npos).T == WallCell && pp.game.WrongWall[npos]) || pp.game.Player.HasStatus(StatusDig)) &&
d.Cell(npos).Explored
}
if pp.game.Player.HasStatus(StatusConfusion) {
Expand Down Expand Up @@ -116,7 +116,7 @@ func (ap *autoexplorePath) Neighbors(pos position) []position {
// XXX little info leak
return false
}
return npos.valid() && (d.Cell(npos).T == FreeCell && !ap.game.WrongWall[pos] || d.Cell(npos).T == WallCell && ap.game.WrongWall[pos]) &&
return npos.valid() && (d.Cell(npos).T == FreeCell && !ap.game.WrongWall[npos] || d.Cell(npos).T == WallCell && ap.game.WrongWall[npos]) &&
!ap.game.ExclusionsMap[npos]
}
if ap.game.Player.HasStatus(StatusConfusion) {
Expand Down

0 comments on commit 94db7b3

Please sign in to comment.