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

Line-of-sight robot detection command #1207

Closed
kostmo opened this issue Apr 11, 2023 · 0 comments · Fixed by #1209
Closed

Line-of-sight robot detection command #1207

kostmo opened this issue Apr 11, 2023 · 0 comments · Fixed by #1209
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
Copy link
Member

kostmo commented Apr 11, 2023

So far there are many commands for locating entities, but few for locating robots.

A scout command would answer whether any (visible) robot exists along a direct line of sight in a cardinal direction.

Introducing such a command with "limited power"---in this case, returning a Boolean rather than some richer type, and requiring that the user position themselves "inline" with the target robot---facilitates more interesting challenges.

Furthermore, a new property of entities, Opaque, should be introduced, which can block the line of sight for this command.

@kostmo 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 Apr 11, 2023
@kostmo kostmo mentioned this issue Apr 11, 2023
@mergify mergify bot closed this as completed in #1209 Apr 18, 2023
mergify bot pushed a commit that referenced this issue Apr 18, 2023
Closes #1207

This PR also involves some refactoring that simplifies more return values in `Step.hs` with `asValue`.
mergify bot pushed a commit that referenced this issue Jun 20, 2023
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant