Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid helper #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

grid helper #39

wants to merge 1 commit into from

Conversation

jonnytest1
Copy link

@jonnytest1 jonnytest1 commented Jul 15, 2022

made a small helper class for general grid layouts (partially copied from things i did previously)

its currently still not integrated perfectly so its just here as an idea

im thinking it might be unifiable if
Cell.down etc was expressed as Cell[createVector(0,-1)]

because then it possible to just invert the directional offset vector to reference the validOptions of a connection

(since this would be a slightly bigger change i stopped halfway through because i thought i'd get some feedback before rewriting it all ^^)

some more ideas can be gleaned off this class structure i made a while ago
https://github.com/jonnytest1/workadventure-mapserver/blob/master/resources/mapserver/service/generic-map-factory/game-map-map-factory.ts
for a minesweeper game

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