Skip to content

Commit

Permalink
fix: canReach(): Try all directions
Browse files Browse the repository at this point in the history
  • Loading branch information
minitauros committed Jul 23, 2022
1 parent 7edca88 commit 0627a03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flood_filler.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (f *FloodFiller) CountSteps(base, target Coord) int {
func (f *FloodFiller) canReach(base, target Coord, countSteps bool, allowedStarts ...Coord) bool {
distanceBefore := f.s.getDistance(target)
filledAroundBefore := f.s.getCoordsFilledAround(target)
for _, d := range base.GetDirectionsTo(target) {
for _, d := range GetAllDirections() {
coordInDirection := base.GetCoordInDirection(d)
if len(allowedStarts) > 0 {
var mayStartInThisDirection bool
Expand Down

0 comments on commit 0627a03

Please sign in to comment.