AdityaGupta1 / eloncraft

electric man
MIT License
2 stars 1 forks source link

fix launchpad error reporting #61

Closed AdityaGupta1 closed 5 years ago

AdityaGupta1 commented 5 years ago
  1. Find a 7x7 square - any combination of launchpads and controllers - that has no blocks currently in use. If this can't be found, return "No valid configurations available! Check that you have a 7x7 square with no blocks already in use by another rocket."
  2. Repeat but this time check for the number of controllers. If there are no squares with exactly one controller, return "Either not enough or too many controllers! Make sure the 7x7 square has only one controller."
  3. Repeat but this time check for the placement of the controller. If there are no squares with the controller at the right spot (at the edge of the square in one of the four cardinal directions). If no squares with a correctly placed controller exist, return "Controller misplaced! Make sure the controller is at the middle of one of the 7x7 square's edges."
  4. If none of the previous steps fail, place a rocket at the center of the found 7x7 square.
AdityaGupta1 commented 5 years ago

keep a running list of possible positions and narrow it down each time at the end, select the first one (or maybe use some scoring method to find the best one)