tudo-aqua / bgw

BoardGameWork
https://tudo-aqua.github.io/bgw/
Apache License 2.0
24 stars 16 forks source link

[bgw-gui] Hexagon grid with OFFSET and AXIAL coordinate systems #373

Closed abouzerda closed 1 year ago

abouzerda commented 1 year ago

Added support for the AXIAL coordinate system: Now, you can choose between OFFSET and AXIAL coordinate systems for your hexagon grid.

Improved coordinate conversion functions: I made sure to handle negative values correctly.

Updated documentation

Added code examples

offset

axial

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.19 :warning:

Comparison is base (c6ce44e) 14.28% compared to head (41e03d7) 14.10%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #373 +/- ## ========================================== - Coverage 14.28% 14.10% -0.19% ========================================== Files 274 277 +3 Lines 7098 7190 +92 Branches 948 964 +16 ========================================== Hits 1014 1014 - Misses 6025 6115 +90 - Partials 59 61 +2 ``` | [Impacted Files](https://app.codecov.io/gh/tudo-aqua/bgw/pull/373?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua) | Coverage Δ | | |---|---|---| | [.../kotlin/tools/aqua/bgw/builder/AnimationBuilder.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/373?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvYnVpbGRlci9BbmltYXRpb25CdWlsZGVyLmt0) | `0.00% <0.00%> (ø)` | | | [...lin/tools/aqua/bgw/builder/ComponentNodeBuilder.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/373?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvYnVpbGRlci9Db21wb25lbnROb2RlQnVpbGRlci5rdA==) | `0.00% <0.00%> (ø)` | | | [...in/kotlin/tools/aqua/bgw/builder/HexagonBuilder.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/373?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvYnVpbGRlci9IZXhhZ29uQnVpbGRlci5rdA==) | `0.00% <0.00%> (ø)` | | | [.../main/kotlin/tools/aqua/bgw/builder/NodeBuilder.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/373?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvYnVpbGRlci9Ob2RlQnVpbGRlci5rdA==) | `0.00% <0.00%> (ø)` | | | [...tools/aqua/bgw/components/container/HexagonGrid.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/373?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvY29tcG9uZW50cy9jb250YWluZXIvSGV4YWdvbkdyaWQua3Q=) | `0.00% <0.00%> (ø)` | | | [...a/bgw/components/gamecomponentviews/HexagonView.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/373?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvY29tcG9uZW50cy9nYW1lY29tcG9uZW50dmlld3MvSGV4YWdvblZpZXcua3Q=) | `0.00% <0.00%> (ø)` | | | [...qua/bgw/observable/lists/ReadonlyObservableList.kt](https://app.codecov.io/gh/tudo-aqua/bgw/pull/373?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tudo-aqua#diff-Ymd3LWd1aS9zcmMvbWFpbi9rb3RsaW4vdG9vbHMvYXF1YS9iZ3cvb2JzZXJ2YWJsZS9saXN0cy9SZWFkb25seU9ic2VydmFibGVMaXN0Lmt0) | `91.66% <0.00%> (-8.34%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.