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

Compass device #341

Closed
xsebek opened this issue May 28, 2022 · 2 comments · Fixed by #373
Closed

Compass device #341

xsebek opened this issue May 28, 2022 · 2 comments · Fixed by #373
Labels
C-Low Hanging Fruit Ideal issue for new contributors. G-Entities An issue having to do with game entities. L-Capability checking Capability checking determines which capabilities are required by a given piece of code. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-Feature A new feature to be added to the game.

Comments

@xsebek
Copy link
Member

xsebek commented May 28, 2022

In some challenges it is undesirable to be able to turn to cardinal directions.

For example in some algorithmic challenges the robot should only turn left or right, to teach thinking relative to the robot.

The chess horse challenge sets the robot direction to [2,1] so it moves like the knight piece. Turning north cheeses the challenge. 😅

Solution

Create a compass device, some cardinal orientation ability which will be required for cardinal directions.

The recipe could be something really simple like:

1 water ─┬───── compass
1 copper ┘
   wire

Alternatives

We could limit abilities directly in challenges, but it would still require creating some compass ability.


@xsebek xsebek added Z-Feature A new feature to be added to the game. C-Low Hanging Fruit Ideal issue for new contributors. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. L-Capability checking Capability checking determines which capabilities are required by a given piece of code. G-Entities An issue having to do with game entities. labels May 28, 2022
@xsebek
Copy link
Member Author

xsebek commented May 28, 2022

Well iron plate would be more realistic. We could even add lodestone, if magnets were useful in other recipes (lodestone + iron plate -> magnetized iron plate + lodestone).

@byorgey
Copy link
Member

byorgey commented Jun 4, 2022

Should be pretty easy to add a new capability, maybe called orient, and update capability checking so orient is required any time a cardinal direction is mentioned.

xsebek added a commit to xsebek/swarm that referenced this issue Jun 10, 2022
@xsebek xsebek mentioned this issue Jun 10, 2022
@mergify mergify bot closed this as completed in #373 Jun 14, 2022
mergify bot pushed a commit that referenced this issue Jun 14, 2022
- add iron ore, iron mine and iron vein (closes #93)
  - split gear into iron/wooden gear
  - add metal drill
  - add faster recipes with the metal drill
- add compass (closes #341)
- handle multiple entities providing the same capability
  - try to find if the robot has at least one entity providing the capability
  - when no entity could provide the capability rejects it too
- list required devices in the `Incapable` error (closes #342)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Low Hanging Fruit Ideal issue for new contributors. G-Entities An issue having to do with game entities. L-Capability checking Capability checking determines which capabilities are required by a given piece of code. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. Z-Feature A new feature to be added to the game.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants