-
Notifications
You must be signed in to change notification settings - Fork 53
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
Implement more sensory commands #1171
Labels
L-Commands
Built-in commands (e.g. move, try, if, ...) in the Swarm language.
Z-Feature
A new feature to be added to the game.
Comments
kostmo
added
Z-Feature
A new feature to be added to the game.
L-Commands
Built-in commands (e.g. move, try, if, ...) in the Swarm language.
labels
Mar 20, 2023
Merged
mergify bot
pushed a commit
that referenced
this issue
Mar 29, 2023
towards #1171 ## New tests Unit tests: scripts/run-tests.sh --test-arguments '--pattern "Relative direction"' Integration tests for `sniff` and `chirp` demonstrate how to home in on an item using distance and orientation, respectively. ## Efficiency For the sake of execution time, I have capped the max "diameter" (`N`) of both commands to `200` cells. In the worst case (the entity is not present), `O(N^2)` cells are inspected, which manifests as a perceptible delay when the command is run. I came across the `getElemsInArea` function that seems to suggest that an `O(N * log N)` search may be possible. Is that the case? Otherwise we may be able to add some new data structures to the game state for efficient entity location querying.
Merged
mergify bot
pushed a commit
that referenced
this issue
Apr 9, 2023
Towards #1171 The `resonate` command counts entities of a given type within a rectangle. This PR also fixes a bug in `detect` when the rectangle coords are non-ascending.
Collecting some ideas here for recipes + new devices (will fill in more detail later).
|
Closing this in favor of #1813, to keep things more self-contained. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
L-Commands
Built-in commands (e.g. move, try, if, ...) in the Swarm language.
Z-Feature
A new feature to be added to the game.
sniff
command (sniff/chirp commands #1181)sniff
capability (sniff/chirp commands #1181)sniff
recipe (device defined in canonical devices for push, watch, sniff #1263)chirp
command (sniff/chirp commands #1181)chirp
capability (sniff/chirp commands #1181)chirp
reciperesonate
command (resonate command #1204)resonate
capability (resonate command #1204)resonate
recipeFrom this comment:
The text was updated successfully, but these errors were encountered: