Skip to content

Wrap torus neighbor steps with modulo - #6

Open
kvnloo wants to merge 1 commit into
xt4d:mainfrom
kvnloo:fix/wrap-neighbor-modulo
Open

Wrap torus neighbor steps with modulo#6
kvnloo wants to merge 1 commit into
xt4d:mainfrom
kvnloo:fix/wrap-neighbor-modulo

Conversation

@kvnloo

@kvnloo kvnloo commented Sep 2, 2026

Copy link
Copy Markdown

stepCell wrap treated any negative or overflow coordinate as the opposite rim (columns-1 / 0). A cell two tiles off-board therefore jumped to the far edge instead of wrapping through the period.

This slice only changes neighbor stepping. Heuristic wrap is a separate PR.

Pin: node --experimental-default-type=module --test gameblocks/modules/behavior/GridPathPlanner.wrap-neighbors.test.js

…edge.

stepCell treated any negative or overflow coordinate as the opposite rim, so a cell two tiles off-board jumped to columns-1 instead of wrapping through the period.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant