Skip to content

Commit

Permalink
🐛 fix Grid's traverse()
Browse files Browse the repository at this point in the history
The bail option was inverted. Fixes #84.
  • Loading branch information
flauwekeul committed Aug 2, 2022
1 parent 9472a14 commit 38daeb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/grid/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class Grid<T extends Hex> implements Iterable<T> {
const foundHex = this.getHex(hex)
if (foundHex) {
result.#setHex(foundHex)
} else if (!bail) {
} else if (bail) {
return result
}
}
Expand Down

0 comments on commit 38daeb0

Please sign in to comment.