Repository navigation
feat(hexmap): HexMap facade, README and packaging (L8) - #134
Merged
Merged
Conversation
- HexMap facade mirroring origami_map::MapTrait, plus new_hexagon, search_path_weighted, field_of_movement, distance_to, hex_distance, reachable, range, ring, keep_component, neighbor and is_walkable (hexx vocabulary). Zero facade overhead, measured in bench_map. - keep_component uses Bfs::reachable (-4 % to -39 % vs Caver). - ring in one flood: -38 % to -43 % vs two range calls. - End-to-end scenario benchmarks (17x14 and 7x7) with budgets. - Crate README: conventions, API, panics, gas, u252, migration note. - Root re-exports of HexMap, Direction and u252. - Drop the A* baseline (finders/astar, finders/heap, bench_astar). - Publishable: remove publish = false, add origami_hexmap to the CI package job and the root README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lot L8 of
origami_hexmap: the public face of the package.HexMapfacade (map.cairo), mirroringorigami_map::MapTraitname for name:new,new_empty,new_maze,new_cave,new_random_walk,open_with_corridor,open_with_maze,compute_distribution,search_path. Hex additions:new_hexagon,search_path_weighted(Dial),field_of_movement,distance_to(path distance),hex_distance(geometric),reachable,range,ring,keep_component,neighbor,is_walkable. The names follow thehexxvocabulary where it applies.bench_map.cairo.keep_componentusesBfs::reachable: −4.3 % (cave 17x14), −7.3 % (maze), −39 % (7x7) vsCaver::keep_component.ringin one flood, open edge tiles included: −43 % (17x14), −42 % (7x7), −38 % (opened map) vs tworangecalls.new_cave+keep_component+open_with_corridor+compute_distribution(10)+search_path): 1.16M on 17x14 and 486k on 7x7. The same scenario onorigami_map18x14 costs 145.8M (cairo-test estimate).u252guidance and a migration note fromorigami_map::hex. TheGAS.mdL8 section is filled.HexMap,HexMapTrait,Direction,u252,U252Trait.finders/astar.cairo,finders/heap.cairoandtests/bench_astar.cairoare deleted.publish = falseis removed, andorigami_hexmapis added to the CIpackagejob and to the root README.scarb package -p origami_hexmappasses on a clean tree (36 files, 903.57 KiB, 130.33 KiB compressed). Nothing is published.API change: the stubs'
tiles_within_rangeanddistanceare renamed torangeandhex_distance, as the brief asks.Tests
snforge test -p origami_hexmap: 882 passed, 3 ignored.scarb fmt --check -p origami_hexmapis clean.🤖 Generated with Claude Code