Note: This assumes the availability of Turn, Advance, and ShootBoulder subroutines.
The idea is as follows:
After a breach, advance to the back wall. Once it stops, use FrontLeft ultrasonic to detect whether it breached the low bar.
If it did, take the following additional steps:
Rotate clockwise 120 degrees, such that the left edge is parallel with left-most tower wall.
Shoot boulder (not dump). Hopefully, score.
Otherwise:
Rotate clockwise 30 degrees, such that the left edge is parallel with the right-most tower wall.
Shoot boulder (not dump). Hopefully, score.
(note: If we start by breaching a middle defense, such that either rotation will not line up with a low goal, then the end result will be the same as a "dump boulder". Scoring will only happen for low bar and right-most defense.)
Note: This assumes the availability of Turn, Advance, and ShootBoulder subroutines.
The idea is as follows:
After a breach, advance to the back wall. Once it stops, use FrontLeft ultrasonic to detect whether it breached the low bar.
If it did, take the following additional steps:
Otherwise:
(note: If we start by breaching a middle defense, such that either rotation will not line up with a low goal, then the end result will be the same as a "dump boulder". Scoring will only happen for low bar and right-most defense.)