-
Notifications
You must be signed in to change notification settings - Fork 54
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
Commands to meet other robots #306
Comments
Instead of a function that returns a list, we could have a function that lets you fold over the robots nearby. This is just as good as having a list but without requiring any special data structures. Something like |
Part of #306. `meet : cmd (() + robot)` returns `inl ()` if no other robot is on the same cell as you, and `inr r` if one of the other robots is `r`.
@byorgey I like the second I take it will not be possible to use it with atomic? 😄 |
Yes, I agree.
Haha, definitely not! |
I had almost convinced myself that the version with
|
Any ideas for what device could provide the |
I would suggest something made out of mid game material like iron or silver.
|
Good idea. We've talked about adding |
Closes #306. Closes #931. - Renamed `robot` type to `actor` in anticipation of meeting other things besides robots. - `meet : cmd (unit + actor)` returns an arbitrary actor within Manhattan distance 1, if any. - `meetAll : (b -> actor -> cmd b) -> b -> cmd b` will run on every nearby actor. - Added `antenna` device to provide the commands. - Added "make a friend" challenge that requires the use of `meet`.
This is an idea that came out of the discussion on #212 . The basic version would be to have a command like
meet : cmd (() + robot)
which gives you a reference to another robot in the same cell as you (or perhaps up to a certain distance away), if there is one. With lists (see #97 and #154), there could also be some kind ofmeetAll : cmd (list robot)
.The text was updated successfully, but these errors were encountered: