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

bug/creature-move #6

Open
adradr opened this issue Aug 11, 2023 · 0 comments
Open

bug/creature-move #6

adradr opened this issue Aug 11, 2023 · 0 comments

Comments

@adradr
Copy link
Owner

adradr commented Aug 11, 2023

Review the creature pixel occupation and move action processing, so it happens without collision. Each step each creature should obtain the occupied pixels and move to a new pixel if its not occupied. If it is occupied move only as much as possible without any collision. The only way to handle this is in a sequence:

  • Creature A move receives occupied pixels
  • Creature A moves to a new unoccupied pixel
  • Creature A move updates occupied pixels and returns the array
  • Creature B move receives occupied pixel... etc

Is it possible to do this somehow in parallel?

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

No branches or pull requests

1 participant