-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ add, update and remove several Grid methods
add: - `filter()`, `map()`, `forEach()` methods, which behave nearly identical to those of `Array` - `neighborOf()` method remove: - `toMap()`, `toObject()` since people can easily do that with `reduce()` and have more control - `clone()` because it only does `return new Grid(grid)` - `update()` because people can just use `setHexes()` with one of the iteration methods update: - `traverse()` to return a new grid - add `{ allowOutside }` option to `pointToHex()`, `distance()` and `neighborOf()`. `allowOutside` defaults to `true`, but when set to `false` the method returns `null` when it can't find a hex in the grid
- Loading branch information
1 parent
8cecfef
commit e08bc46
Showing
1 changed file
with
76 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters