Expand description
§board_game_range
A set of iterators for target ranges in a square tile based board game.
§Supported Range Types
| Iterator | Pattern |
|---|---|
| Diamond Range | ⬜⬜🟦⬜⬜ ⬜🟦🟦🟦⬜ 🟦🟦⬜🟦🟦 ⬜🟦🟦🟦⬜ ⬜⬜🟦⬜⬜ |
| Square Range | ⬜⬜⬜⬜⬜ ⬜🟦🟦🟦⬜ ⬜🟦🟦🟦⬜ ⬜🟦🟦🟦⬜ ⬜⬜⬜⬜⬜ |
| Cross Range | ⬜⬜🟦⬜⬜ ⬜⬜🟦⬜⬜ 🟦🟦🟦🟦🟦 ⬜⬜🟦⬜⬜ ⬜⬜🟦⬜⬜ |
| Circular Range | ⬜🟦🟦🟦⬜ 🟦🟦🟦🟦🟦 🟦🟦🟦🟦🟦 🟦🟦🟦🟦🟦 ⬜🟦🟦🟦⬜ |
| Rectangle Range | ⬜⬜⬜⬜⬜ 🟦🟦🟦🟦🟦 🟦🟦🟦🟦🟦 🟦🟦🟦🟦🟦 ⬜⬜⬜⬜⬜ |
| Square Frontal | ⬜🟦🟦🟦⬜ ⬜🟦🟦🟦⬜ ⬜⬜🟥⬜⬜ ⬜⬜⬜⬜⬜ ⬜⬜⬜⬜⬜ |
| Cone Frontal | ⬜🟦🟦🟦⬜ ⬜⬜🟦⬜⬜ ⬜⬜🟥⬜⬜ ⬜⬜⬜⬜⬜ ⬜⬜⬜⬜⬜ |
| Arc Frontal | ⬜⬜⬜⬜⬜ ⬜🟦🟦🟦⬜ ⬜🟦🟥🟦⬜ ⬜⬜⬜⬜⬜ ⬜⬜⬜⬜⬜ |
| Line Segment | ⬜⬜⬜⬜⬜ ⬜⬜⬜⬜🟦 ⬜⬜🟦🟦⬜ 🟦🟦⬜⬜⬜ ⬜⬜⬜⬜⬜ |
| Thick Line Segment | ⬜⬜⬜🟦🟦 ⬜⬜🟦🟦🟦 ⬜🟦🟦🟦⬜ 🟦🟦🟦⬜⬜ 🟦🟦⬜⬜⬜ |
§License
License under either of
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
§Contribution
Contributions are welcome!
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Structs§
- Circular
Range Iter - Cross
Range Iter - Diamond
Range Iter - Frontal
ArcIter - Frontal
Iter - Line
Iter - Rectangle
Range Iter - Squared
Range Iter
Enums§
- ArcAngle
- Angle in
frontal_arc_range.
Functions§
- brush_
line_ range - Move
brushfromstarttoendand iterate through points covered bybrush - circular_
range - Iterate through tiles where their centers are inside a circle based on real distance.
- cross_
range - Iterate through points in a cross shaped range.
- diamond_
range - Iterate though points in a diamond shaped range.
- frontal_
arc_ range - Arc or semicircle range around a point.
- frontal_
rectangle_ range - Rectangular frontal range.
- frontal_
tapered_ range - Frontals are ranges created by selecting an adjacent or diagonal tile.
- frontal_
trapezoid_ range - Cone, triangle of trapezoid frontal range.
- line_
range - Iterate through points on a line segment.
- rectangle_
range - Iterate though points in a rectangle shaped range.
- square_
range - Iterate though points in a square shaped range.
- thick_
line_ range - Iterate through points on a thick line segment.